⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dhtmlxtree_dragin.js

📁 尚学堂JavaScript视频教程源码,可以配合视频使用,其中一些有用的例子也可以在自己的网站中嵌入使用
💻 JS
字号:
//v.1.6 build 71114/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
dhtmlXTreeObject.prototype.makeDragable=function(obj,func){if (typeof(obj)!="object")
 obj=document.getElementById(obj);dragger=new dhtmlDragAndDropObject();dropper=new dhx_dragSomethingInTree();dragger.addDraggableItem(obj,dropper);obj.dragLanding=null;obj.ondragstart=dropper._preventNsDrag;obj.onselectstart=new Function("return false;");obj.parentObject=new Object;obj.parentObject.img=obj;obj.parentObject.treeNod=dropper;dropper._customDrop=func};dhtmlXTreeObject.prototype.makeAllDraggable=function(func){var z=document.getElementsByTagName("div");for (var i=0;i<z.length;i++)if (z[i].getAttribute("dragInDhtmlXTree"))
 this.makeDragable(z[i],func)};function dhx_dragSomethingInTree(){this.lWin=window;this._createDragNode=function(node){var dragSpan=document.createElement('div');dragSpan.style.position="absolute";dragSpan.innerHTML=node.innerHTML;dragSpan.style.zIndex=12;return dragSpan};this._preventNsDrag=function(e){(e||window.event).cancelBubble=true;if ((e)&&(e.preventDefault)) {e.preventDefault();return false};return false};this._nonTrivialNode=function(tree,item,bitem,source){if (this._customDrop)return this._customDrop(tree,source.img.id,item.id,bitem?bitem.id:null);var image=(source.img.getAttribute("image")||"");var id=source.img.id||"new";var text=(source.img.getAttribute("text")||(_isIE?source.img.innerText:source.img.textContent));tree[bitem?"insertNewNext":"insertNewItem"](bitem?bitem.id:item.id,id,text,"",image,image,image)}};//(c)dhtmlx ltd. www.dhtmlx.com//v.1.6 build 71114/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -