当未输入密码时,移到确定弹出请输入密码,否则不弹出,下面是代码
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 鼠标经过事件 </title>
<script type="text/javascript">
function message(){
var v=document.getElementById("lakaslf").value;
if(v==""){
confirm("请输入密码后,再单击确定!");
}
}
</script>
</head>
<body>
<form>
密码:<input name="password" type="password" id="lakaslf" >
<input name="确定" type="button" value="确定" onmouseover="message()"/>
</form>
</body>
</html>