提示:Undefined attribute name (data-options).
<form method="post" action="user/add" style="position: relative;">
<img id="photo_image" style="position: absolute; right:10px; top:15px;width:135px;height: 150px;" src="images/default.png"/>
<div class="form-item">
<label class="iblock">用户名:</label>
<input type="text" class="easyui-validatebox" name="username" data-options="required:true,missingMessage:'用户名必须填写',validType:'length[6,10]'"/>
</div>
<div class="form-item">
<label class="iblock">Email:</label>
<input type="text" class="ipt easyui-validatebox" name="email" data-options="validType:'email'"/>
</div>
<div class="form-item">
<label class="iblock">密码:</label>
<input id="pwd" type="password" class="ipt easyui-validatebox" name="password" data-options="required:true,validType:'length[6,6]'"/>
</div>
<div class="form-item">
<label class="iblock">确认密码:</label>
<input type="password" class="ipt easyui-validatebox" data-options="required:true,validType:'eq[\'#pwd\']'"/></div>
</form>
data-options是jquery easyui 最近几个版本才开发的一个属性。在控件中具有和Index相对应的Controller,调用其中的方法。因为有这个属性,我们在html中就可以实例化组件。
子节点属性赋值
[html] view plain copy
<span style="font-size:14px;"><div class="easyui-dialog" style="width:200px;height:100px"
data-options="title:'My Dialog',collapsible:true,iconCls:'icon-ok',onOpen:function(){}">
dialog content.
</div></span>
data-options是jquery easyui 最近几个版本才开发的一个属性。在控件中具有和Index相对应的Controller,调用其中的方法。因为有这个属性,我们在html中就可以实例化组件。
我们在html中就可以实例化组件。
如果不影响代码功能可以使用js的validate: window--》Preferences--》Validation
IDE中的提示不影响代码运行
data-xxx 这个属性,是html5的用法,如果你有强迫症,不希望看到警告,那么在jsp页面开头加上:
<!DOCTYPE html>
让ide知道你在写一个html5的页面,就不会再报错了。