鼠标点击,鼠标经过,鼠标离开事件(练习)

<!DOCTYPE html>
<html lang="en">
<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('人生寂寞如雪')">点击有惊喜!</p>
<marquee onmouseover="this.stop()"onmouseout="this.start()">我是一只小小鸟!</marquee>

<p onclick="alert('别人都叫我妖孽')" id="a">请叫我罗总</p>

</body>
</html>

posted @ 2017-04-19 22:54  非凡。  阅读(3706)  评论(2编辑  收藏  举报