标签:doc ++ body click src == var ima this
<body>
<img src="images/hot.jpg" id="imgId"/>
</body>
<script>
i=0;
var imgObj=document.getElementById("imgId");
imgObj.onclick=function(){
if(i%2==0){
this.src="images/hot1.jpg"
}else{
this.src="images/hot.jpg"
}
i++;
}
</script>
标签:doc ++ body click src == var ima this
原文地址:http://www.cnblogs.com/wanan-01/p/7498701.html