jquery-esayui的input框常用属性

来源:互联网 发布:java高级编程 jdk6版 编辑:程序博客网 时间:2024/05/17 23:12
<table class="tableForm">    <tr>     <td style="text-align:right;">手机号</td>        <td colspan="2">          <input type="text" name="phone"  class="easyui-numberbox" data-options="required:true"  maxlength="11"/>        </td>    </tr>    <tr>    </tr>    <tr>         <td style="text-align:right;">名称</td>        <td colspan="3">            <input  type="text"  name="name" class="easyui-validatebox" data-options="required:true" maxlength="15"/>        </td>    </tr>    <tr>        <td style="text-align:right;">日报开关</td>        <td style="text-align:left">            <span class="radioSpan">                <input type="radio" name="sendSwitch" value="0" checked="checked"></input>                <input type="radio" name="sendSwitch" value="1"></input>            </span>        </td>    </tr>    <tr>        <td style="text-align:right;">计费开关</td>        <td style="text-align:left">            <span class="radioSpan">                <input type="radio" name="chargingsendswitch" value="0" checked="checked"></input>                <input type="radio" name="chargingsendswitch" value="1"></input>            </span>        </td>    </tr></table>

不能为空:data-options=”required:true”
只能写数字:class=”easyui-numberbox”
什么都可以写:class=”easyui-validatebox”
限制内容长度:maxlength=”15”
刚进入页面单选按钮默认选中其中一个:

<input type="radio" name="sendSwitch" value="0" checked="checked">开</input><input type="radio" name="sendSwitch" value="1">关</input>

回显时值是什么就选中哪个:

<input type="radio"  name="sendSwitch" value="0" ${dailyList.sendSwitch=='0'?'checked':'' }/>开<input type="radio"  name="sendSwitch" value="1" ${dailyList.sendSwitch=='1'?'checked':'' }/>关