我用ajax调用,但是浏览器总是报
SyntaxError: expected expression, got '<
这个错! 我以为是多了个“<”括号
但是我认真的看了jsp发现并没有啊,实在不知道怎么办了! 下面我把jsp的代码贴出来大家帮我看看 后台程序运行正常
<%@page contentType="text/html;charset=utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>忘记密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="web/css/newpublicStyle.css"/>
<link rel="stylesheet" type="text/css" href="web/css/newlogin.css"/>
<link rel="stylesheet" type="text/css" href="web/css/newvalidationEngineJquery.css"/>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/public.js"></script>
<script type="text/javascript" src="js/jquery-validationEngine-zh-CN.js"></script>
<script type="text/javascript" src="js/jquery-validationEngine.min.js"></script>
<script type="text/javascript" src="js/WdatePicker.js"></script>
<script type="text/javascript">
function checkPara(){
var acct = document.getElementById("acct").value;
if(acct.trim().length==0){
alert("账号不能为空!");
document.getElementById("acct").focus;
return false;
// window.location.href="Login!forgetPasswdCheckAcct.action?user.acct="+acct;
}
jQueryPost("/Login!forgetPasswdCheckAcct.action",{
"user.acct":document.getElementById("acct").value
},function(status,msg){
alert(msg);
if(status==4){
alert("用户不存在!");
return;
}else if(status==5){
alert("用户已停用!");
return;
}else if(status==6){
alert("非学生账户!");
return;
}else{
window.location.href="Login!toResetPwd.action";
}
});
};
</script>
</head>
<!--style="min-width:1342px;"-->
<body>
<div class="header">
<div class="headerCont">
<div class="headerLeft">
<img src="web/images/newlogo.png"/>
</div>
<div class="headerRight">
<p>已有账号?</p>
<a href="/"><img src="web/images/6_4.1.png"></a>
</div>
</div>
</div>
<div class="container">
<div class="middle">
<div class="loginPassInput">
<div class="passwordInput">
<form class="formValidation">
<div class="rebuildPass">重设密码</div>
<div class="account">
<div class="rebuildWord">请输入您需要找回的账号,用于重设密码信息</div>
<div class="rebuildAccount">
<label><span>*</span>账 号:</label>
<input id="acct" name="user.acct" class="validate[required] text-input"/>
</div>
<div class="rebuildEnsure"><img src="web/images/6_5.9.png" onclick="checkPara()"/></a></div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="footer button">
版权所有:互联天下 2016
</div>
</body>
</html>