<pre name="code" class="html">
显示弹窗,setInterval() 方法可按照指定的周期(以毫秒计)来调用函数或计算表达式
function() {
$(".theme-popover-mask-daoshu").show();
$(".theme-popover-mask-daoshu").height($(document).height());
$(".theme-popover-daoshu").slideDown(200);
window.setInterval("show();", 1000);
}
function show(){
var s = $("#dd").html();
if(s == 0){
window.location.href="${pageContext.request.contextPath}/";
return false;
}
$("#dd").html(s-1);
}
弹窗div:
<pre name="code" class="html"> <div class="theme-popover-mask-daoshu"></div>
<div class="theme-popover-daoshu ZebraDialog">
<div class="ZebraDialog_BodyOuter">
<div class="ZebraDialog_Body ZebraDialog_Icon ZebraDialog_Information" style="border-bottom-width:0px;padding-left: 0px;">
<div style="padding-top: 14.25px;font-family:'微软雅黑';" align="center">请等待<span id="dd" style="color:red;font-family:'宋体';font-size:xx-large;font-weight:bold;">3</span>秒</div>
</div>
</div>
</div>