脚本说明:第一步:把如下代码加入首页(本例为password1.htm)的<head>区域中<SCRIPT LANGUAGE="javascript"><!--- Hidevar new_window = null;function password() {new_window = window.open('password2.htm', 'pass', 'width=350,height=150,resizable=1');//你可以改变链接和窗口大小}//---></SCRIPT>第二步:在首页(本例为password1.htm)的<body>区域中加入(用来调用输入密码页)<A HREF="javascript:password()">这里</A>第三步:在password2.htm(你可以自己随着设定)页面<head>中加入<SCRIPT LANGUAGE="JavaScript"><!--Hidefunction goForit() {var location;var password;password=this.document.testform.inputbox.valuelocation=password + ".htm"fetch(location)theKeeper=window.close()}function fetch(location) {var root;if (opener.closed) {root=window.open('','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');root.location.href = location;} else {opener.location.href = location;}}//--></SCRIPT>第四步:在password2.htm(你可以自己随着设定)页面<body>中加入<CENTER><FONT SIZE=3>输入密码,然后按submit进入密码页(即进入相应的time1.htm页面中)</FONT><FORM NAME="testform"><INPUT TYPE="text" NAME="inputbox" VALUE="" size=20><INPUT TYPE="button" NAME="button" Value="Submit" onClick="goForit(this.form)"></FORM></FONT><p>密码为:time1</CENTER>
添加回答
举报
0/150
提交
取消