每日总结 5.9
今日完成广告的判断处理,广告图片的闪烁切换,对弹出广告做出优化处理;
<script type="text/javascript"> var time = 10; //时间,秒 var i = 0; function dis() { document.all.s.innerHTML = (time - i); i++; } timer = setInterval('dis()', 1000); //显示时间 timer = setTimeout('del()', time * 1000); function del(){ var div= document.getElementById("aside"); div.parentNode.removeChild(div); //删除 } var srcq="erv.png"; var srcq1="gg.webp"; function changeImg(){ var img = document.getElementById("im1"); img.src = "images/"+srcq; var s=srcq; srcq=srcq1; srcq1=s; //id传入src } var timeID; timerID = setInterval("changeImg()",2000); </script>