?? 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("student")
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 studentreg set spass='" & new1 & "' where snick='" & nick & "'"
conn.Execute(strSql)
Response.Write("密碼修改成功")
End If
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -