comboBoxSingleCheckBox.htm 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. <style type="text/css">
  7. </style>
  8. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  10. <script src="../../lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
  11. <script src="../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  12. <script src="../../lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  13. <script type="text/javascript">
  14. $(function ()
  15. {
  16. $("#test1").ligerComboBox({ isShowCheckBox: true,
  17. data: [
  18. { text: '张三', id: '1' },
  19. { text: '李四', id: '2' },
  20. { text: '赵武', id: '44' }
  21. ], valueFieldID: 'test3',label:'选择姓名',labelWidth:200,labelAlign:'center'
  22. });
  23. });
  24. function clickee()
  25. {
  26. alert($("#test3").val());
  27. }
  28. function clickee2()
  29. {
  30. alert($("#test1").ligerGetComboBoxManager().getValue());
  31. }
  32. function clickee3()
  33. {
  34. $("#test1").ligerGetComboBoxManager().setValue(2);
  35. }
  36. function clickee4()
  37. {
  38. $("#test1").ligerGetComboBoxManager().setDisabled();
  39. }
  40. function clickee5()
  41. {
  42. $("#test1").ligerGetComboBoxManager().setEnabled();
  43. }
  44. </script>
  45. </head>
  46. <body style="padding:10px">
  47. <input type="text" id="test1" />
  48. <input type="hidden" id="test2" />
  49. <br />
  50. <a href="javascript:clickee()" class="l-button" style="width:100px">获取</a>
  51. <a href="javascript:clickee2()" class="l-button" style="width:100px">获取2</a>
  52. <a href="javascript:clickee3()" class="l-button" style="width:100px">设置值</a>
  53. <a href="javascript:clickee4()" class="l-button" style="width:100px">设置只读</a>
  54. <a href="javascript:clickee5()" class="l-button" style="width:100px">取消只读</a>
  55. <br /><br /><br /><br />
  56. <div style="display:none;">
  57. </div>
  58. </body>
  59. </html>