Javascript 在页面中5分钟后显示自定义引导模式?
我想显示自动引导模式在我的页面后5分钟从页面完全加载时间和用户无法关闭模式我该怎么办 此外,我使用默认模式代码,如下所示Javascript 在页面中5分钟后显示自定义引导模式?,javascript,jquery,Javascript,Jquery,我想显示自动引导模式在我的页面后5分钟从页面完全加载时间和用户无法关闭模式我该怎么办 此外,我使用默认模式代码,如下所示 <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria- labelledby="exampleModalLabel" aria-hidden="true"
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
情态标题
&时代;
...
接近
保存更改
页面加载后使用setTimeout
setTimeout(()=>{
$('exampleModal').modal({
背景:“静态”,键盘:错误
})
} , 30000)
FYI,如果您只是在页面内容上添加一个模式,知道如何使用“检查元素”的用户将能够轻松摆脱您的模式,并继续执行他/她在页面上所做的任何操作。