<!-- 五秒后自动关闭的广告 -->
<!--
<img src="张学友.webp" alt="" class="ad"/>
<p id="gb">X</p>
<script>
var ad = document.querySelector('.ad');
var gb = document.querySelector('#gb');
var flag = 1;
if(flag == 1){
gb.onclick = function(){
ad.style.display = 'none';
}
flag = 0;
}
if(flag == 1){
gb.onclick = function(){
ad.style.display = 'none';
}
setTimeout(function(){
ad.style.display = 'none';
},5000);
flag == 0;
}
</script> -->
<!-- <script>
window.addEventListener('resize',function(){
console.log('变化了');
})
</script> -->
【BOM】五秒后自动关闭的广告
最新推荐文章于 2024-08-17 12:54:01 发布