每日总结 5.8
今天进行了广告的div改写。
</div> <div class="aside"> <span id="s">10</span> <span>秒后关闭</span> <button onclick="del()">关闭</button> </div>
<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(){ document.getElementById('aside').remove() } </script>