关于弹窗广告代码求教

来源:百度知道 编辑:UC知道 时间:2024/06/01 06:27:33
我在网上找了个弹窗时间间隔代码
其中有一行参数是改 广告地址的
var exitURL="http://www.hao123.com"; //广告地址
但我的弹窗代码是一个JS代码,请问怎么将我的弹窗代码调用到时间间隔
代码里面呢???
下面是时间间隔的完整代码
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, en

我明白您的意思了,您是希望在弹出的窗口中,包含您的JS代码。是这个意思吧?
我加了两行,有注释。

下面是完整的代码:

==============================================

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) {