<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>
时间: 2024-10-10 18:11:08