basic.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Basic Menu - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Basic Menu</h2>
  14. <p>Right click on page to display menu.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div id="mm" class="easyui-menu" style="width:120px;">
  17. <div onclick="javascript:alert('new')">New</div>
  18. <div>
  19. <span>Open</span>
  20. <div style="width:150px;">
  21. <div><b>Word</b></div>
  22. <div>Excel</div>
  23. <div>PowerPoint</div>
  24. <div>
  25. <span>M1</span>
  26. <div style="width:120px;">
  27. <div>sub1</div>
  28. <div>sub2</div>
  29. <div>
  30. <span>Sub</span>
  31. <div style="width:80px;">
  32. <div onclick="javascript:alert('sub21')">sub21</div>
  33. <div>sub22</div>
  34. <div>sub23</div>
  35. </div>
  36. </div>
  37. <div>sub3</div>
  38. </div>
  39. </div>
  40. <div>
  41. <span>Window Demos</span>
  42. <div style="width:120px;">
  43. <div data-options="href:'window.html'">Window</div>
  44. <div data-options="href:'dialog.html'">Dialog</div>
  45. <div><a href="http://www.jeasyui.com" target="_blank">EasyUI</a></div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div data-options="iconCls:'icon-save'">Save</div>
  51. <div data-options="iconCls:'icon-print',disabled:true">Print</div>
  52. <div class="menu-sep"></div>
  53. <div>Exit</div>
  54. </div>
  55. <script>
  56. $(function(){
  57. $(document).bind('contextmenu',function(e){
  58. e.preventDefault();
  59. $('#mm').menu('show', {
  60. left: e.pageX,
  61. top: e.pageY
  62. });
  63. });
  64. });
  65. </script>
  66. </body>
  67. </html>