Yang Saya Berikan Kotak Warna "Merah" Itu Contohnya |
- Log In Blog atau Masuk di Sini
- Kemudian Masuk ke "Tata Letak" lalu klik "Tambah Widget"
- Cari "HTML/JavaScript" dan Copy Kode ini :
<center><script type="text/javascript">
var days = 730;
var lastvisit=new Object();
var firstvisitmsg="<span style='background-image: url(http://i41.servimg.com/u/f41/16/21/76/15/bling110.gif); '>Selamat Datang Sobat! Ini adalah Kunjungan Pertama Anda</span>";
lastvisit.subsequentvisitmsg="<span style='background-image: url(http://i41.servimg.com/u/f41/16/21/76/15/bling110.gif);'><b>Terima Kasih Sobat Anda Datang Kesini Lagi ! <br/> Sebelumnya anda Pernah berkunjung pada hari [displaydate]</b></span>";
lastvisit.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1];
return''; // edit by http://www.masbugie.com
}
lastvisit.setCookie=function(name, value, days){
var expireDate = new Date();
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage = function() {
var wh = new Date();
if (lastvisit.getCookie("visitc") == "") {
lastvisit.setCookie("visitc", wh, days);
document.write(firstvisitmsg);
}
else {
var lv = lastvisit.getCookie("visitc");
var lvp = Date.parse(lv);
var now = new Date();
now.setTime(lvp);
var day = new Array("Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu");
var month = new Array ("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
var dd = now.getDate();
var dy = now.getDay();
dy = day[dy];
var mn = now.getMonth();
mn = month[mn];
yy = now.getFullYear();
var hh = now.getHours();
var ampm = "AM";
if (hh >= 12) {ampm = "PM"}
if (hh >12){hh = hh - 12};
if (hh == 0) {hh = 12}
if (hh < 10) {hh = "0" + hh};
var mins = now.getMinutes();
if (mins < 10) {mins = "0"+ mins}
var secs = now.getSeconds();
if (secs < 10) {secs = "0" + secs}
var dispDate = dy + " tanggal " + dd+ " " + mn + " " + yy + " Jam " + hh + ":" + mins + ":" + secs + " " + ampm
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))
}
lastvisit.setCookie("visitc", wh, days);
}
lastvisit.showmessage();</script></center> - dan Paste ke "Konten" yg ada HTML/Java Script tadi yg agan buka
- Kemudian Simpan dan Lihat Hasilnya. :)
Itulah tadi Cara Memasang Widget Kata Sambutan "Kunjungan Pertama" di Blog Semoga Bermanfaat yah Kawan :)
Jikalau Mau COPAS Harap Cantumkan Sumber !!!
0 Comments