简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

限量版广告 1个IP一天只弹一次的AD代码

来源:易贤网   阅读:818 次  日期:2015-03-18 11:04:09

温馨提示:易贤网小编为您整理了“限量版广告 1个IP一天只弹一次的AD代码”,方便广大网友查阅!

以下是引用片段:

function setCookie(name, value, expire) {

window.document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));

}

function getCookie(Name) {

var search = Name + "=";

if (window.document.cookie.length > 0) { // if there are any cookies

offset = window.document.cookie.indexOf(search);

if (offset != -1) { // if cookie exists

offset += search.length; // set index of beginning of value

end = window.document.cookie.indexOf(";", offset) // set index of end of cookie value

if (end == -1)

end = window.document.cookie.length;

return unescape(window.document.cookie.substring(offset, end));

}

}

return null;

}

function register(name) {

var today = new Date();

var expires = new Date();

expires.setTime(today.getTime() + 1000*60*60*24);

setCookie("ItDoor", name, expires);

}

var exitURL=http://www.jztop.com/;

function openWin() {

var c = getCookie("ItDoor");

if (c != null) {

return;

}

register("xiaolin");

var featureStr="''";

featureStr="'top=0,left=0,width=800,height=600,toolbar=yes, menubar=no, scrollbars=no, resizable=no, location=no, status=no,center:no'";

self.focus();

var ExitWindow = window.open(exitURL,'', featureStr);

ExitWindow.focus();

}

openWin();

window.focus() ========================完成任务==============

在需要弹出的网页中调用上面的代码:

以下是引用片段:

<Script src="ad.js"></Script>

更多信息请查看IT技术专栏

更多信息请查看脚本栏目
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:javascript获取当前日期时间及操作
下一篇:各浏览器中 Date 对象的 getYear 方法的返回值不一致
易贤网手机网站地址:限量版广告 1个IP一天只弹一次的AD代码
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!