在使用EasyUI之前必须先声明UI控件,有两个方法声明它。

1. 直接在 HTML 声明组件。

  1. <div class="easyui-dialog" style="width:400px;height:200px"
  2. data-options="title:'My Dialog',collapsible:true,iconCls:'icon-ok',onOpen:function(){}">
  3. dialog content.
  4. </div>

2:编写 JavaScript 代码来创建组件。

  1. <input id="cc" style="width:200px" />
  1. $('#cc').combobox({
  2. url: ...,
  3. required: true,
  4. valueField: 'id',
  5. textField: 'text'
  6. });
posted on 2018-01-11 09:23  肆言  阅读(116)  评论(0)    收藏  举报