當(dāng)未輸入密碼時(shí),移到確定彈出請輸入密碼,否則不彈出,下面是代碼
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 鼠標(biāo)經(jīng)過事件 </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>
2016-01-21
謝謝分享
2015-11-25
謝謝分享
2015-09-06
非常好,謝謝分享。