Copy & Paste script dibawah ini ke bagian <HEAD> section pada web anda.
<script type="text/javascript">Tidak semua halaman web bisa. Sdh di test dan berhasil di Joomla, Wordpress, Blogspot.
//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
//Visit JavaScriptKit.com for free JavaScripts
//This notice must stay intact for legal use
//Win Type: Pop Up | 5 minutes period
//Specify URLs to randomly select from and popup/popunder:
//To display a single URL, just remove all but the first entry below:
var popurls=new Array()
popurls[0]="http://www.javascriptkit.com" // edit nama web
popurls[1]="http://www.drive.com" // edit nama web popurls[2]="http://www.webmasterpick.com" // edit nama web popurls[3]="http://www.codingforums.com" // edit nama web
function openpopup(popurl){
var winpops=window.open(popurl,"","width=400,height=400,location,status,scrollbars,resizable")
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
popfrequency="5 minutes" // waktu default 5 menit
function resetcookie(){
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()-10)
document.cookie = "jkpopunder=;path=/;expires=" + expireDate.toGMTString()
}
function loadornot(){
if (get_cookie('jkpopunder')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()+parseInt(popfrequency))
document.cookie = "jkpopunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
}
}
if (get_cookie('jkpopunder')!=parseInt(popfrequency))
resetcookie()
loadornot()
</script>
atau anda bisa langsung create sendiri di JK Popup Window Generator
Semoga silahkan di coba dan semoga bermanfaat.
No comments:
Post a Comment