把 if mofei= then Response.Write(<script language=javascript>alert('请输入验证码');this.location.href='admin_login.asp';</script>) response.end end if if cstr(session(CheckCode))<>cstr(mofei) then Response.Write(<script language=javascript>alert('你输入的验证码有误');this.location.href='admin_login.asp';</script>) response.end end if 这2段去掉 与这个没关系admin_login.asp,你只要把上面的2句删除即可