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