Home >Web Front-end >HTML Tutorial >Complete html example code of mouse click, passing, and mouse leaving events (picture)
This article explains the htm implementation method of mouse click, pass, and mouse leave events. The following is the complete html example code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript"> var a,b,c; a=100;b=200; c=a;a=b;b=c; console.log(a,b); alert(a+" "+b); window.onload=function(){ var sj; sj=document.getElementById("a"); sj.style.color="pink"; sj.style.width="100px"; sj.style.lineHight="30px"; sj.style.lineHight="30px"; sj.style.textAlign="center"; sj.style.background="purple"; } </script> </head> <body> <p onclick="alert('php中文网html实例')">点击有惊喜!</p> <marquee onmouseover="this.stop()"onmouseout="this.start()">我是php中文网(www.php.cn)!</marquee> <p onclick="alert('别人都叫我小猪')" id="a">请叫我钟老师</p> </body> </html>
The display effect of mouse click, pass, and mouse leave events:
The above is the detailed content of Complete html example code of mouse click, passing, and mouse leaving events (picture). For more information, please follow other related articles on the PHP Chinese website!