Complete html example code of mouse click, passing, and mouse leaving events (picture)

PHPz
Release: 2017-04-23 10:46:40
Original
9531 people have browsed it

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(&#39;php中文网html实例&#39;)">点击有惊喜!</p>
<marquee onmouseover="this.stop()"onmouseout="this.start()">我是php中文网(www.php.cn)!</marquee>

<p onclick="alert(&#39;别人都叫我小猪&#39;)" id="a">请叫我钟老师</p>

</body>
</html>
Copy after login

The display effect of mouse click, pass, and mouse leave events:

Complete html example code of mouse click, passing, and mouse leaving events (picture)


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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!