button.htm 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  6. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  7. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  8. <script src="../../lib/ligerUI/js/plugins/ligerButton.js" type="text/javascript"></script>
  9. <script type="text/javascript">
  10. var manager;
  11. $(function ()
  12. {
  13. manager = $("#btn").ligerButton(
  14. {
  15. click: function ()
  16. {
  17. alert('111');
  18. }
  19. }
  20. );
  21. $("#btnSet").bind('click', function ()
  22. {
  23. manager.setValue('设置值');
  24. });
  25. $("#btnGet").bind('click', function ()
  26. {
  27. alert(manager.getValue());
  28. });
  29. $("#btnDisabled").bind('click', function ()
  30. {
  31. manager.setDisabled();
  32. });
  33. $("#btnEnabled").bind('click', function ()
  34. {
  35. manager.setEnabled();
  36. });
  37. });
  38. </script>
  39. </head>
  40. <body style="padding:10px">
  41. <div id="btn"></div>
  42. <input type="button" id="btnSet" value="设置值" />
  43. <input type="button" id="btnGet" value="获取值" />
  44. <input type="button" id="btnDisabled" value="设置只读" />
  45. <input type="button" id="btnEnabled" value="取消只读" />
  46. <div style="display:none;">
  47. </div>
  48. </body>
  49. </html>