<div class="new_user" id="new_user">
<div class="new_pic">
<a target="_blank" href="http://sucaihuo.com">
<img alt="智慧小屋大背景图片" src="images/pic.png">
</a>
</div>
<span class="new_close" onclick="hideNewUser()"></span>
</div>
<div class="overlay" id="overlay"></div>
<iframe src="https://jy.tp.yuanmeng.life/modals/4/444/demo/" width="100%" height="100%" scrolling="yes"/> var is_first = getCookie("is_first");
if (is_first != 1) {
showNewUser();
var time = getTodayOtherTime(); //每天一次
setCookie("is_first", 1, time);//3600 * 24 有效期一天
} else {
hideNewUser();
} function setCookie(name, value, time) { //name:cookie键名,value:cookie键值,和时间S
var exp = new Date();
exp.setTime(exp.getTime() + time * 1000);//有效期1小时
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
} function getTodayOtherTime() {
var today = new Date();
today.setHours(0);
today.setMinutes(0);
today.setSeconds(0);
today.setMilliseconds(0);
//明日0点时间戳
var tomorrow_0 = today.getTime() / 1000 + (24 * 3600);
var current_time = Math.round(new Date().getTime() / 1000);
var expire = tomorrow_0 - current_time;
return expire;
} function showNewUser() {
var document_height = $(document).height();
var window_height = $(window).height();
var height = document_height > window_height ? document_height : window_height;
$("#overlay").css({"height": height, "display": "block"})
$("#new_user").show();
} function hideNewUser() {
$("#new_user").hide();
$("#overlay").css({"display": "none"})
}
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
