错误类型:发生异常!
<script language="javascript">function checkForm(){
if(document.form1.oldpwd.value==""){
alert('请输入密码!');
return false;
}
if(document.form1.newpwd.value==""){
alert('请输入你的新密码!');
return false;
}
if(document.form1.renewpwd.value==""){
alert('请输入你的确认新密码!');
return false;
}
}
</script>
<%
oldpwd =request.Form("oldpwd")
newpwd=request.Form("newpwd")
renewpwd=request.Form("renewpwd")
set rs=server.CreateObject("adodb.recordset")
sql="select passwd from username where username='"&session("usernaem")&"'"
rs.open sql,conn,3,3
if rs.eof then
if rs("passwd")<>oldpwd then
response.Write("<script>alert('你输入的原始密码有误,请重新输入');history.go(-1);</script>")
response.End()
end if
end if
if newpwd<>renewpwd then
response.Write("<script>alert('你二次输入的新密码不一致,请重新输入');history.go(-1);</script>")
response.End()
end if
conn.execute("update username set passwd ='"&newpwd&"' where username='"&session("username")&"'")
%>
请大侠值得一下啊!