【发布时间】:2025-12-11 14:25:01
【问题描述】:
我想在访问者进入网站之前向他们显示一条消息,然后允许他们使用按钮继续访问主网站。我也不想移动主要站点的位置。
与此类似:
<script>
function continue() { /* function to continue loading site */ }
</script>
<p>This is a message. <button onclick="continue();">I agree</button></p>
<script>
//stop loading what's below when someone enters the site, and display only the message
</script>
<html>
<body>
<p>This is my main site with a lot of content.</p>
</body>
</html>
我不能只覆盖主站点,我不希望它的任何功能在访问者阅读消息时运行。
谁能指出我正确的方向?
【问题讨论】:
-
您最有效的选择是覆盖页面并使用按钮淡出 div 以显示其余内容。具体是什么不允许您这样做?
标签: javascript php jquery html dom