actions.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>TimeSpinner 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>TimeSpinner Actions</h2>
  14. <p>Click the buttons below to perform actions.</p>
  15. <div style="margin:20px 0;">
  16. <a href="#" class="easyui-linkbutton" onclick="getValue()">GetValue</a>
  17. <a href="#" class="easyui-linkbutton" onclick="setValue()">SetValue</a>
  18. <a href="#" class="easyui-linkbutton" onclick="disable()">Disable</a>
  19. <a href="#" 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="dt" class="easyui-timespinner" label="Select Time:" labelPosition="top" value="01:20" style="width:100%;">
  24. </div>
  25. </div>
  26. <script>
  27. function getValue(){
  28. var val = $('#dt').timespinner('getValue');
  29. alert(val);
  30. }
  31. function setValue(){
  32. $('#dt').timespinner('setValue', '09:45');
  33. }
  34. function disable(){
  35. $('#dt').timespinner('disable');
  36. }
  37. function enable(){
  38. $('#dt').timespinner('enable');
  39. }
  40. </script>
  41. </body>
  42. </html>