#13 修正并加强Jquery Validate Plugin的使用
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<script src="${ctx}/static/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/messages_cn.js" type="text/javascript"></script>
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/milk.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/validate.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<sitemesh:head/>
|
||||
</head>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
equalTo: "输入与上面相同的密码"
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
if ( element.is(":checkbox") )
|
||||
error.appendTo ( element.parent().next() );
|
||||
@@ -52,7 +53,10 @@
|
||||
<form:form id="inputForm" modelAttribute="user" action="${ctx}/account/user/save/${user.id}" method="post">
|
||||
<input type="hidden" name="id" value="${user.id}"/>
|
||||
<fieldset class="prepend-top">
|
||||
|
||||
<legend>管理用户</legend>
|
||||
|
||||
<div id="messageBox" class="error" style="display:none">输入有误,请先更正。</div>
|
||||
|
||||
<div>
|
||||
<label for="loginName" class="field">登录名:</label>
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
<legend>登录</legend>
|
||||
<div>
|
||||
<label for="username" class="field">名称:</label>
|
||||
<input type="text" id="username" name="username" size="40" value="${username}" class="required"/>
|
||||
<input type="text" id="username" name="username" size="25" value="${username}" class="required"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password" class="field">密码:</label>
|
||||
<input type="password" id="password" name="password" size="40" class="required"/>
|
||||
<input type="password" id="password" name="password" size="25" class="required"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<title>综合演示用例</title>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/messages_cn.js" type="text/javascript"></script>
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/milk.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/validate.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<title>Showcase 登录页面</title>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.9.0/messages_cn.js" type="text/javascript"></script>
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/milk.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/jquery-validation/1.9.0/validate.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
Reference in New Issue
Block a user