📄 changepw.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function checkpw()
{
if(myform.new1.value!=myform.new2.value)
{
alert("两次输入的密码不等!");
return false;
}
return true;
}
</script>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
color: #003399;
}
-->
</style>
</head>
<body>
<p>
<form method="post" onSubmit="return checkpw();" name="myform">
<table width="70%" border="0" align="center">
<tr>
<td>新密码:</td>
<td><input type="password" name="new1" size=20></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" name="new2" size=20></td>
</tr>
<tr>
<td><input type="submit" name="st" value="提交"></td>
<td><input type="reset" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
<%
if Request.Form("st")<>"" then
nick=session("teacher")
new1=Request.Form("new1")
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Dbq=" & Server.Mappath("../db/info.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
strSql="update teacherreg set pass='" & new1 & "' where nick='" & nick & "'"
conn.Execute(strSql)
Response.Write("密码修改成功")
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -