[CODE]
<script>
<!--
function check()
{
var x=document.form1;
if(x.uid.value==""){
alert("请输入帐号!");
x.uid.focus();
return false;}
if(x.pwd.value==""){
alert("请输入密码!");
x.pwd.focus();
return false;}
if(x.pwd.value.length!=8){
alert("密码必须为8位!");
x.pwd.focus();
return false;}
alert("登录成功");
}
-->
</script>
<form name="form1" method="post" action="">
<p>
用户名:
<input name="uid" type="text" id="uid">
</p>
<p>密&nbsp;&nbsp;码:
<input name="pwd" type="password" id="pwd">
</p>
<p>
<input type="submit" name="Submit" value="提交" onClick="return check()">
<input type="reset" name="Submit2" value="重置">
</p>
</form>[/CODE]