JavaScript teti...LOGIN

JavaScript tetikus ke atas acara (onmouseover)

Acara mouseover, apabila tetikus bergerak ke atas objek, objek tersebut mencetuskan acara onmouseover dan melaksanakan program yang dipanggil oleh acara onmouseover.

Contoh: Apabila tetikus bergerak ke elemen terikat pada acara onmouseover, kotak dialog

<!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>


munculbahagian seterusnya
<!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>
babperisian kursus