4ca1b9342f7ea7a0977511653134e56cbebff091.svn-base 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. <input id="cc" class="easyui-combotree" data-options="url:'tree_data1.json',method:'get',required:true" style="width:200px;">
  22. <script type="text/javascript">
  23. function getValue(){
  24. var val = $('#cc').combotree('getValue');
  25. alert(val);
  26. }
  27. function setValue(){
  28. $('#cc').combotree('setValue', '122');
  29. }
  30. function disable(){
  31. $('#cc').combotree('disable');
  32. }
  33. function enable(){
  34. $('#cc').combotree('enable');
  35. }
  36. </script>
  37. </body>
  38. </html>