游览器缓存的问题, 在你的 ajax 请求的url 后面 加一个  毫秒数 即可..
应该是这个原因吧!

解决方案 »

  1.   

    可是 可是 当我简化后 运行这个为什么就可以....
    <%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <html:base />
        
        <title>head.jsp</title> <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <link rel="stylesheet" type="text/css" href="styles.css">
    <!--刷新的代码-->
    <script language='JavaScript'> 
    function checkSubmit(){
    if(document.form1.signup_uid.value==""){
    alert("用户名不能为空!");
    document.form1.signup_uid.focus();
    return false;
    }
    if(document.form1.signup_pwd.value==""){
    alert("密码不能为空!");
    document.form1.signup_pwd.focus();
    return false;
    }
    if(document.form1.signup_pwd.value!=null && document.form1.signup_pwd.value.length<4){
    alert("密码长度要大于4!");
    document.form1.signup_pwd.focus();
    return false;
    }
    if(document.form1.signup_pwd2.value==""){
    alert("确认密码不能为空!");
    document.form1.signup_pwd2.focus();
    return false;
    }
    if(document.form1.signup_pwd.value != document.form1.signup_pwd2.value){
    alert("两次密码不一致!!");
    document.form1.signup_pwd2.focus();
    return false;
    }
    if(document.form1.signup_mobilephone.value==""){
    alert("手机号码不能为空!");
    document.form1.signup_mobilephone.focus();
    return false;
    }
    if(document.form1.signup_email.value==""){
    alert("电子邮件不能为空!");
    document.form1.signup_email.focus();
    return false;
    }
    if(document.form1.yzm.value==""){
    alert("验证码不能为空!");
    document.form1.yzm.focus();
    return false;
    }
    var flag = true;
    if(true==flag){
    document.form1.submit();
    flag = false;
    }else{
    alert("你已经提交过了表单,请不要重复提交!");
    }

    else{
    return true;
    }
    }
    function check(){
    if(document.form1.username.value==""){
    alert("用户名不能为空!");
    document.form1.username.focus();
    return false;
    }
    if(document.form1.password.value==""){
    alert("密码不能为空!");
    document.form1.password.focus();
    return false;
    }
    else{
    return true;
    }
    }
         function reloadImage(url) 
         { 
         document.img1.src = url+'?id='+Math.random();
         } 
        </script>  </head>
    <body>
    <form action="display.do" method="post" enctype="multipart/form-data"
    name="form1" id="form1">
    <table>
    <tr>
    <td>姓名:</td>
    <td><input type=text name="username"></td>
    </tr>
         <tr>
         <td >验证码:</td>
         <td nowrap="nowrap"><html:text property="rand"/>
         <img border=0 src="image.jsp" name="img1">&nbsp;*请输入左手边图片中的数字!
         <a href="JavaScript:reloadImage('image.jsp');">看不清,换一张?</a>
         </td>
         </tr>
         <tr>
    <td>密码:</td>
    <td><input type=text name="password"></td>
    </tr>
         <tr><td><input type="submit" name="signup_submit"
    onClick="return check()"></td></tr>
    </table>
    </form> 
    </body>
    </html>
      

  2.   

    对不起  , 发错了  是这个 为什么这个可以...<%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <html:base />
        
        <title>head.jsp</title> <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <link rel="stylesheet" type="text/css" href="styles.css">
    <!--刷新的代码-->
    <script language='JavaScript'>  function check(){
    if(document.form1.username.value==""){
    alert("用户名不能为空!");
    document.form1.username.focus();
    return false;
    }
    if(document.form1.password.value==""){
    alert("密码不能为空!");
    document.form1.password.focus();
    return false;
    }
    else{
    return true;
    }
    }
         function reloadImage(url) 
         { 
         document.img1.src = url+'?id='+Math.random();
         } 
        </script>  </head>
    <body>
    <form action="display.do" method="post" enctype="multipart/form-data"
    name="form1" id="form1">
    <table>
    <tr>
    <td>姓名:</td>
    <td><input type=text name="username"></td>
    </tr>
         <tr>
         <td >验证码:</td>
         <td nowrap="nowrap"><html:text property="rand"/>
         <img border=0 src="image.jsp" name="img1">&nbsp;*请输入左手边图片中的数字!
         <a href="JavaScript:reloadImage('image.jsp');">看不清,换一张?</a>
         </td>
         </tr>
         <tr>
    <td>密码:</td>
    <td><input type=text name="password"></td>
    </tr>
         <tr><td><input type="submit" name="signup_submit"
    onClick="return check()"></td></tr>
    </table>
    </form> 
    </body>
    </html>
      

  3.   

    肯定是check函数出问题了.
    LZ不用贴代码了,自己把check函数一句一句测试过去,问题肯定可以解决了