[英]Website entry confirmation popup
I'm looking for a confirmation box for php site to confirm entering you are over the age of 18 exactly like this 我正在寻找php网站的确认框,以确认输入的您完全超过18岁,就像这样
http://www.bitandpiecesvape.co.uk/ http://www.bitandpiecesvape.co.uk/
but not sure what to do so it doesn't keep showing itself while browsing the site. 但不确定该怎么做,因此浏览网站时不会一直显示自己。
Use localStorage. 使用localStorage。
<div id="hide4ever" style="display:none">text
<button onclick="hideNow()">close</button>
</div>
<script>
if (!localStorage.hide4ever)
document.getElementById('hide4ever').style.display = "fixed";//or whatever
function hideNow() {
document.getElementById('hide4ever').style.display = "none";
localStorage.hide4ever="true";
}
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.