1.代码如下:
<!DOCTYPE html>
<html>
<head>
<title>设置新密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" >
function _url(){
var Url=top.window.location.href;
var u,g,StrBack='';
if(arguments[arguments.length-1]=="#")
u=Url.split("#");
else
u=Url.split("?");
if (u.length==1) g='';
else g=u[1];
if(g!=''){
gg=g.split("&");
var MaxI=gg.length;
str = arguments[0]+"=";
for(i=0;i<MaxI;i++){
if(gg[i].indexOf(str)==0) {
StrBack=gg[i].replace(str,"");
break;
}
}
}
document.getElementById('jsdemo2').value = Url;
}
</script>
</head>
<body οnlοad="_url();">
<div>
<form name="form1" method="POST" action="passwdreset.php">
<table>
<tr>
<td> </td>
<td><div align="right">新密码:</div></td>
<td><input type="password" name="newpasswd"/></td>
</tr>
<tr>
<td> </td>
<td colspan="2">密码长度为6-16位,可用英文字母、数字、特殊字符.</td>
</tr>
<tr>
<td> </td>
<td><div align="right">确认密码:</div></td>
<td><input type="password" name="newpasswd2"/></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="确认"/></td>
<td><input type="reset" name="submit2" value="清空"/></td>
</tr>
<input type="hidden" name="url" id='jsdemo2'>
</table>
</form>
</div>
</body>
</html>