Javascript| Pop-up Window | timed
You can build a ads.js, the following is the code for this JS file. Call this file to the page you need to eject the ad, the following code implements the code that pops up every 24 hours:
function Openpopup () {
Document.writeln ("<script language=javascript>");
Document.writeln ("window.open (' http://www.webjx.com ')");
Document.writeln ("</script\>");
}
function Get_cookie (Name) {
var search = Name + "="
var returnvalue = "";
if (Document.cookie.length > 0) {
offset = document.cookie.indexOf (search)
if (offset!=-1) {
Offset + = Search.length
End = Document.cookie.indexOf (";", offset);
if (end = = 1)
end = Document.cookie.length;
Returnvalue=unescape (document.cookie.substring (offset, end))
}
}
Return returnvalue;
}
function webjx_com () {
if (Get_cookie (' popped ') = = ") {
Openpopup ()
Document.cookie= "Popped=yes"
}
}
Webjx_com ()
Note: The red section is replaced by the URL where you want to eject the advertisement.