jQuery easyui form表单验证 写在js代码里
<html><head><scripttype="text/javascript"src="<%=request.getContextPath()%>/easyui/jq...
<html>
<head>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/plugins/jquery.validatebox.js"></script>
、、字数不够了、、省略css代码
</head>
<body>
<div class="easyui-panel" id="tt">
<form id="login" action="<%=request.getContextPath() %>/test/test.action" method="post">
<table>
<tr>
<td>username</td>
<td><input type="text" name="user.loginName" id="userName"/></td>
</tr>
<tr>
<td>virtualName</td>
<td><input type="text" name="user.virtualName" id="virtualName"/></td>
</tr>
</table>
<input type="submit" value="submit" />
</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#login').validatebox({
rules : {
userName : 'required',
virtualName : 'required'
}
})
});
</script>
</body>
</html>
这是html 求大神指点 展开
<head>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/plugins/jquery.validatebox.js"></script>
、、字数不够了、、省略css代码
</head>
<body>
<div class="easyui-panel" id="tt">
<form id="login" action="<%=request.getContextPath() %>/test/test.action" method="post">
<table>
<tr>
<td>username</td>
<td><input type="text" name="user.loginName" id="userName"/></td>
</tr>
<tr>
<td>virtualName</td>
<td><input type="text" name="user.virtualName" id="virtualName"/></td>
</tr>
</table>
<input type="submit" value="submit" />
</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#login').validatebox({
rules : {
userName : 'required',
virtualName : 'required'
}
})
});
</script>
</body>
</html>
这是html 求大神指点 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询