水资源管理办法:求助这个javascript的问题。。

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/12 05:38:17
<html>
<head>
<title>脚本学习示例</title>
<script language="javascript">
function checkValue() {
var accountID;
var accountIDLength;
var passw;
var passLength;
accountID = txtAccountID.value;
accountIDLength = accountID.length;
passw = txtpass.value;
passLength = passw.length;
if(accountIDLength == 0){
alert("请输入用户名!");
txtAccountID.focus();
} else if(passLength == 0){
alert("请输入密码!");
txtpass.focus();
}
}
</script>
</head>
<body bgcolor ="green">
<center>银行登录系统</center><br>
<br><hr><br><form>
用户名:<input type="text" name="txtAccountID"><br>
密码:  <input type="password" name="txtpass"> <br>
<input type="button" name="cmdSubmit" value="submit" onclick="checkValue()">
</body>
</html>

请求错误在哪儿,就是运行不了,好象都对的