in.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<h1>登录成功!</h1>
</BODY>
</HTML>
N9.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="JavaScript">
function check()
{
var con=document.getElementById("CON");
var user=document.getElementById("USR");
var pass=document.getElementById("PASS");
if((con.value==1) && (user.value=="USR1") && (pass.value=="PASS1")){window.open("./in.html");}
else if((con.value==2) && (user.value=="USR2") && (pass.value=="PASS2")){window.open("./in.html");}
else if((con.value==3) && (user.value=="USR3") && (pass.value=="PASS3")){window.open("./in.html");}
else {alert("错误!");}
}
</script>
</HEAD>
<BODY>
<form>
所属国家
<select id="CON">
<option value="1">中国</option>
<option value="2">日本</option>
<option value="3">美国</option>
</select>
<h5>用户名<h5>
<input type="text" id="USR">
<h5>密码<h5>
<input type="password" id="PASS">
<br>
<input type="button" value="登录" οnclick="check()">
</form>
</BODY>
</HTML>