javascript 在html和jsp中显示效果不同是怎么回事?代码如下! 10
<scripttype="text/javascript">$(document).ready(function(){Administry.setup();varvali...
<script type="text/javascript">
$(document).ready(function(){
Administry.setup();
var validator = $("#loginform").validate({
rules: {
username: "required",
password: "required"
},
messages: {
username: "Enter your username",
password: "Provide your password"
},
errorPlacement: function(error, element) {
error.insertAfter(element.parent().find('label:first'));
},
success: function(label) {
label.html(" ").addClass("ok");
}});});
</script>
jsp中:
html中:
<form id="loginform" method="post" action="adminUserLogin.action"><p>
<label class="required" for="strLoginName">Username:</label><br/>
<input type="text" id="strLoginName" class="full" name="userVOTemp.strLoginName"/>
</p><p>
<label class="required" for="strPassword">Password:</label><br/>
<input type="password" id="strPassword" class="full" name="userVOTemp.strPassword"/>
</p><p>
<input type="checkbox" id="remember" class="" value="1" name="remember"/>
<label class="choice" for="remember">Remember me?</label>
</p><p>
<input type="submit" class="btn btn-green big" value="Login"/> <a href="javascript: //;" onClick="$('#emailform').slideDown(); return false;">Forgot password?</a> or <a href="#">Need help?</a></p>
<div class="clear"> </div></form>
表单中什么也不填!点击submit后,jsp和html中显示的内容如上图! 展开
$(document).ready(function(){
Administry.setup();
var validator = $("#loginform").validate({
rules: {
username: "required",
password: "required"
},
messages: {
username: "Enter your username",
password: "Provide your password"
},
errorPlacement: function(error, element) {
error.insertAfter(element.parent().find('label:first'));
},
success: function(label) {
label.html(" ").addClass("ok");
}});});
</script>
jsp中:
html中:
<form id="loginform" method="post" action="adminUserLogin.action"><p>
<label class="required" for="strLoginName">Username:</label><br/>
<input type="text" id="strLoginName" class="full" name="userVOTemp.strLoginName"/>
</p><p>
<label class="required" for="strPassword">Password:</label><br/>
<input type="password" id="strPassword" class="full" name="userVOTemp.strPassword"/>
</p><p>
<input type="checkbox" id="remember" class="" value="1" name="remember"/>
<label class="choice" for="remember">Remember me?</label>
</p><p>
<input type="submit" class="btn btn-green big" value="Login"/> <a href="javascript: //;" onClick="$('#emailform').slideDown(); return false;">Forgot password?</a> or <a href="#">Need help?</a></p>
<div class="clear"> </div></form>
表单中什么也不填!点击submit后,jsp和html中显示的内容如上图! 展开
2个回答
展开全部
有一点疑问 jsp 解析后不是就生成HTML了么 什么叫JSP中 和 HTML中?
浏览器直接打开.jsp文件?
JSP中各个CSS和script路径正确了么?
浏览器直接打开.jsp文件?
JSP中各个CSS和script路径正确了么?
追问
路径都正确!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询