textbox2.htm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/ligerTextBox.js" type="text/javascript"></script>
  9. <script type="text/javascript">
  10. var manager;
  11. $(function ()
  12. {
  13. manager = $("#r").ligerTextBox({ disabled: true });
  14. manager.bind('ChangeValue', function (value)
  15. {
  16. alert('绑定事件1:' + value);
  17. });
  18. manager.bind('ChangeValue', function (value)
  19. {
  20. alert('绑定事件2:' + value);
  21. });
  22. $("#btnSet").bind('click', function ()
  23. {
  24. manager.setValue(44);
  25. });
  26. $("#btnGet").bind('click', function ()
  27. {
  28. alert(manager.getValue());
  29. });
  30. $("#btnDisabled").bind('click', function ()
  31. {
  32. manager.setDisabled();
  33. });
  34. $("#btnEnabled").bind('click', function ()
  35. {
  36. manager.setEnabled();
  37. });
  38. });
  39. </script>
  40. </head>
  41. <body style="padding:10px">
  42. <input type="text" id="r" ligerui="width:500" />
  43. <input type="button" id="btnSet" value="设置值" />
  44. <input type="button" id="btnGet" value="获取值" />
  45. <input type="button" id="btnDisabled" value="设置只读" />
  46. <input type="button" id="btnEnabled" value="取消只读" />
  47. <div style="display:none;">
  48. </div>
  49. </body>
  50. </html>