打开网站时,我将此弹出窗口用作免责声明。我希望它一次显示。但是它显示了我何时从内页回来。每个会话一次加载此服务的解决方案吗?
<div class="closelightbox">
<div class="iframeContainer">
<h3>DISCLAIMER</h3>
<p>Content</p>
<div class="toolbarLB"> <span class="closeLB" onclick="lightBoxClose()">
<div class="closebtn">I Agree</div>
</span>
</div>
</div>
</div>
<script>
lightBoxClose = function() {
document.querySelector(".closelightbox").classList.add("closed");
}
</script>