JavaScript滑鼠經(jīng)過事件(onmouseover)
滑鼠經(jīng)過事件,當(dāng)滑鼠移到一個(gè)物件上時(shí),該物件就會(huì)觸發(fā)onmouseover事件,並執(zhí)行onmouseover事件呼叫的程式。
實(shí)例:當(dāng)滑鼠移到綁定了onmouseover事件的元素時(shí),彈出對話框
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script> function fun(){ window.alert("請確認(rèn)四周沒有人再點(diǎn)擊提交") } </script> </head> <body> <form> 機(jī)密: <input name="txt" type="text" > <input name="" type="button" value="提交" onmouseover="fun()"/> </form> </body> </html>