<html> <head> <title>登陆</title> <mce:script type="text/javascript"><!-- function login() { if(document.getElementById("user").value =="guanbowen" && document.getElementById("password").value =="123") { window.location.href = "1.html"; } else { alert("用户名或密码不正确"); } } // --></mce:script> </head> <body> <h1>用户登录</h1> 用户名:<input type="text" id = "user" /><br> 密 码:<input type="text" id = "password" /><br> <input type="button" value="提交" onclick = login()><br> </body> </html>