<html>
<head>
</head>
<body>
<script>
function check(){
a=document.getElementById("name").value;
b=document.getElementById("pass").value;
if(a==1&&b==2)
window.confirm("用户名和密码正确!");
else
window.confirm("用户名和密码不正确!");}
</script>
<form>
用户名:<input type="text" id="name"><br>
密码:<input type="password"id="pass"><br>
<input type="button" value="提交" onclick="javascript:check()">
<input type="reset" value="jjb">
</form>
</body>
</html>
为什么去掉.value后,输入账户:1,密码:2     弹出:用户名和密码不正确
到底getElementById()和getElementById.value有什么不同哇·