actions.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>ComboTree Actions - 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>ComboTree Actions</h2>
  14. <p>Click the buttons below to perform actions</p>
  15. <div style="margin:20px 0">
  16. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="getValue()">GetValue</a>
  17. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="setValue()">SetValue</a>
  18. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="disable()">Disable</a>
  19. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="enable()">Enable</a>
  20. </div>
  21. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  22. <div style="margin-bottom:20px">
  23. <input id="cc" class="easyui-combotree" data-options="url:'tree_data1.json',method:'get',label:'Select Node:',labelPosition:'top'" style="width:100%">
  24. </div>
  25. </div>
  26. <script type="text/javascript">
  27. function getValue(){
  28. var val = $('#cc').combotree('getValue');
  29. alert(val);
  30. }
  31. function setValue(){
  32. $('#cc').combotree('setValue', '122');
  33. }
  34. function disable(){
  35. $('#cc').combotree('disable');
  36. }
  37. function enable(){
  38. $('#cc').combotree('enable');
  39. }
  40. </script>
  41. </body>
  42. </html>