编程那点事编程那点事

专注编程入门及提高
探究程序员职业规划之道!

easyui api中文文档:Droppable

可投掷的(Droppable)

用$.fn.droppable.defaults重写defaults。

使用示例(Usage Example)

通过标记创建一个可投掷的区域
通过javascript创建一个可投掷的区域
$('#dd').droppable({
accept:'#d1,#d3'
},2);

属性(Properties)

Name Type Description Default
accept selector 限定哪个可拖动的元素是可以被投掷的 null
disabled boolean 设置为true的话停止投掷 false

事件(Events)

Name Parameters Description
onDragEnter e,source 当可拖拽元素拖拽到可投掷区域时触发 Source元素表示可拖拽的dom元素
onDragOver e,source 当可拖动元素在可投掷区域上时触发。Source元素表示可拖拽的dom元素
onDragLeave e,source 当可拖动元素离开可投掷区域上时触发。Source元素表示可拖拽的dom元素
onDrop e,source 当可拖动元素放置在可投掷区域上时触发。Source元素表示可拖拽的dom元素

方法(Methods)

Name Parameter Description
options none 返回options对象
enable none 使可投掷区域可用
disable none 禁用可投掷区域
未经允许不得转载: 技术文章 » javascript » easyui api中文文档:Droppable