<% set conn= Server.CreateObject("adodb.connection") connstr="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("data.mdb") conn.open connstr %>
<% admin=request("admin") oldpass = request("oldpass") newpass = request("pass1") set rs=conn.execute("select * from admin where password='"+oldpass+"'" ) if rs.eof then response.write "<script language='javascript'>" response.write "alert('你的输入有误,请重试!');" response.write "history.go(-1);" response.write "</script>" response.end else conn.execute("update admin set admin='"+admin+"', password='"+newpass+"'") end if Response.Redirect("index.asp") %> 这是整段代码 我把 else 和那个更新语句删除是可以的 不删除就是该网页无法显示