不是很懂中间为啥要加【0】和value。- -或许以后会学到。但是现在就想知道啊~好烦
<script type="text/javascript">
var text1 = document.getElementsByTagName("input");
function message(){
if(text1[0].value.length<1){
confirm("请输入密码后,再单击确定!"); }}
</script>
</head>
<body>
<form>
密码:<input name="password" type="password" >
<input name="确定" type="button" value="确定" onmouseover="message()"/>
</form>
</body>
</html>