<!DOCTYPE html> <html> <head> <title>jQuery Easy UI</title> <meta charset="UTF-8" /> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/jquery.min.js"></script> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/jquery.easyui.min.js"></script> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/locale/easyui-lang-zh_CN.js" ></script> <link rel="stylesheet" type="text/css" href="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/themes/icon.css" /> <script type="text/javascript"> $(function(){ //$("#box").menu({}); $("#edit").menubutton({ plain : false, menu : "#box",//指定对应的菜单 duration : 5000,//定义鼠标滑过按钮时 菜单所持续的时间 }); //返回属性对象 console.log($("#edit").menubutton("options")); //禁用菜单按钮 $("#edit").menubutton("disable"); //启用菜单按钮 $("#edit").menubutton("enable"); //销毁菜单按钮 //$("#edit").menubutton("destroy"); }); </script> </head> <body> <!-- 该组件依赖于menu 菜单 linkbutton 组件 --> <a href="javascript:void(0)" id="edit" class="easyui-menubutton" data-options="menu:'',iconCls:'icon-edit'">编辑</a> <div id="box" style=" 150px;"> <div data-options="iconCls: 'icon-undo'">撤销</div> <div data-options="iconCls: 'icon-redo'">恢复</div> <div class="menu-sep"></div> <div>剪切</div> <div>赋值</div> <div>粘贴</div> <div class="menu-sep"></div> <div data-options="iconCls:'icon-remove'">删除</div> <div>全选</div> </div> </body> </html>