主页登陆
<br> function check() {<br> if (document.forms(0).name.value == "123" && document.forms(0).pw.value == "123456") {<br> window.location = "body.html";<br> }<br> else {<br> alert("用户名不正确或则密码不正确"); return false;<br> }<br> }<br>
<form name="myform" action="###" method="post" onsubmit="check()">
<label for="name"> 账号:</label><input type="text" size="20" value="" placeholder="请输入账号" name="name" id="name" /><br />
<label for="pw" > 密码:</label><input type="password" id="pw" name="pw" placeholder="请输入密码" value="" /><br />
<input type="submit" value="登录" /><input type="reset" value="重置" />
</form>