html做一个静态的输入密码跳转页

不调用数据库
直接用html语言写
一个页面,要求输入访问密码(不要用户名)
输入密码正确后,跳转到另一个页面。
把html代码给我,谢谢了。

第1个回答  推荐于2016-03-10
<html>
<head><title>test</title>
<script>
function fun() {
var password=document.getElementById("password");
if (password.value == "123") {
window.open("http://www.baidu.com");
return true;
}else {
return false;
}
}
</script>
</head>
<body>
<input type="password" name="password" id="passsword"/>
<input type="button" value="跳转" onclick=" return fun()"/>
</body>
</html>

本回答被提问者采纳
相似回答