我是新来的。我有一个弹出代码,当用户单击 HTML 页面中的任意位置时,会显示一个弹出窗口:
(function () {
document.onclick = function () {
var sUrl = "http://URL.com";
if (typeof daily_capping == "undefined") var daily_capping = 10;
if (typeof capping_minutes == "undefined") var capping_minutes = 60;
if (document.cookie.indexOf("_popwin=") === -1) {
var ads2day = document.cookie.split("_popwinDaily=")[1];
ads2day = typeof ads2day == "undefined" ? 0 : parseInt(ads2day.split(";")[0]);
if (ads2day < daily_capping) {
var isMSIE = navigator.userAgent.indexOf("MSIE") != -1 ? !0 : !1,
_parent = self,
sOptions, popunder;
if (top != self) try {
top.document.location.toString() && (_parent = top)
} catch (err) {}
sOptions = "toolbar=no,scrollbars=yes,location=yes,statusbar=yes,menubar=no,resizable=1,width=" + screen.width.toString() + ",height=" + (screen.height - 20).toString() + ",screenX=0,screenY=0,left=0,top=0", popunder = _parent.window.open(sUrl, "rhpop", sOptions);
if (popunder) {
popunder.blur();
if (isMSIE) {
window.focus();
try {
opener.window.focus()
} catch (err) {}
} else popunder.init = function (e) {
with(e)(function () {
if (typeof window.mozPaintCount != "undefined" || typeof navigator.webkitGetUserMedia == "function") {
var e = window.open("about:blank");
e.close()
}
try {
opener.window.focus()
} catch (t) {}
})()
}, popunder.params = {
url: sUrl
}, popunder.init(popunder)
}
var now = new Date,
popDaily = (new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), 23, 59, 59)).toGMTString();
document.cookie = "_popwinDaily=" + (ads2day + 1) + ";expires=" + popDaily + ";path=/";
var popInterval = new Date;
popInterval.setTime(popInterval.getTime() + capping_minutes * 60 * 1e3), document.cookie = "_popwin=1;expires=" + popInterval.toGMTString() + ";path=/"
}
}
}
})();
但弹出窗口位于顶部。是否可以在主页后面打开它?是否有任何更轻的弹出代码用于此目的?多谢你们