js阻止事件冒泡(phpcms,浮窗第一次10秒弹出后每30秒弹出,动态更换日期)

/*

v9_date_list 日期表

tiptime 考试日期(数据类型为日期)

如果要实现浮窗淡入淡出用jquery的(“#main0”).fadeIn(3500);淡出(“#main0”).fadeOut(3500); 等同函数toggle(3500);

*/

<script>
var set1=setTimeout(“miao10()”,1000);
function view(evt){
var bodyview=document.getElementById(“main0″).style;
if(bodyview.display==””){
bodyview.display=”none”;
}else{
bodyview.display=””
}
var e=(evt)?evt:window.event;
if (window.event) {
e.cancelBubble=true;
} else {
//e.preventDefault();
e.stopPropagation();
}
}
function miao10(){
view();
var set2=setInterval(“view()”,30000);
}

</script>
<style>
/*浮动窗口*/
#lost{
width:600px;
height:315px;
padding:1px solid blue;
margin:0 auto;
background:#fff;
top:30%;
z-index:99999;
position:fixed;
left:34.6%;
}
#close{
height:25px;
right:6px;
width:24px;
}
#close a{
text-decoration:none;
}
#close a img{
float:right;
display:block;
}
</style>

<!–浮动窗口 –>
<div id=”main0″ style=”display:none; position:absolute;z-index:99999;”>
<div id=”masker” style=” position:fixed; left:0px; top:0px; bottom:0px; opacity:0.1; z-index:1; overflow:hidden; display:block;”></div>
<div id=”lost” style=”clear:both;”>
<div class=”download0″ onclick=”doyoo.util.openChat();doyoo.util.accept();return false;” style=”cursor:pointer;width:600px;height:315px; position:relative;width:100%;height:100%;background:url(http://www.benniaoyasi.com/statics/images/h_msg.png)”>
{pc:get sql=”SELECT date_format(tiptime,’%d’) as d,date_format(tiptime,’%m’) as m FROM `v9_data_list` where date(tiptime) >= date(now())” start=”0″ num=”1″}
{loop $data $r}
{/loop}
{/pc}
<div style=”position:absolute;margin-top:94px;margin-left:25px;”>
<img src=”http://www.benniaoyasi.com/statics/images/{substr($r[‘m’],1,1)}.png” />
</div>
<div style=”position:absolute;margin-top:94px;margin-left:98px;”>
<img src=”http://www.benniaoyasi.com/statics/images/{$r[‘d’]}.png” />
</div>
<div id=”close” style=”position:absolute;”><a href=”javascript:void(0);” onClick=”view(event);”><img style=”padding-top:5px;” src=”http://www.benniaoyasi.com/statics/images/1_02.png” />&nbsp;</a></div>
</div>
</div>
</div>

文章链接:,本站部分内容来自互联网,如不慎侵害的您的权益,请告知,我们将尽快删除!

发表评论