<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-12-11 17:07:15