disini iklan
 

Cara membuat jam dan tahun di blog

assalamualikum wr.wb

langsung aja cara membuat jam tanggal tinggal copy paste aja scrip di bawah

secript tanggal

<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array ("Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu")
var montharray=new Array("Januari","Februari","Maret","April","Mei", "Juni","Juli", "Agustus","September","Oktober","November","Desember")
document.write("<p>"+dayarray[day]+", "+daym+" "+montharray[month]+" "+year+"</p>")
</script>



secript tahun

<span id="Variasiblogger"></span>
<script type="text/javascript">
//<![CDATA[
function showclock(){
var digital = new Date();
var hours=digital.getHours();
var minutes=digital.getMinutes();
var seconds=digital.getSeconds();
var dn='AM';
if (hours>12) {
dn='PM';
hours=hours-12;
}
if (hours==0) hours=12;
if (minutes<=9) minutes='0'+minutes;
if (seconds<=9) seconds='0'+seconds;

miReloj='<b><span style="color:#000;font-size:12px;">'
+ hours + '</span> : <span style="color:#000;font-size:12px;">'
+ minutes + '</span> : <span style="color:#000;font-size:12px;">'
+ seconds + '</span></b><span style="color:#000;font-size:12px;margin-left:5px;">'
+ dn + '</span>';
document.getElementById('Variasiblogger').innerHTML=miReloj;
//
setTimeout('showclock()',1000);
}
window.onload=showclock
//]]>
</script>



cara menempelkanya yaitu
  1. pilih tata letak di blog anada
  2. pilih tambah gadget
  3. pilih tambah html/java script
  4. copy deh kode di atas selesai
terimakasih semoga bermanfaat...
wassalam...
 
Top