JavaScript mouse move event (onmouseout)
Mouse move event, when the mouse moves away from the current object, the program called onmouseout is executed.
Transform our previous example:
<!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>