JavaScript鼠標移開事件(onmouseout)
鼠標移開事件,當鼠標移開當前對象時,執(zhí)行onmouseout調(diào)用的程序。
改造我們的上一個例子:
<!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="提交之后移開鼠標" onmouseout="fun()"/> </form> </body> </html>