cara membuat jam dan tanggal diwebsite atau blogger
Saturday 25 January 2014
Add Comment
login web/blog inii script.nya
<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>
<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>
sekian dan terimakasi
0 Response to "cara membuat jam dan tanggal diwebsite atau blogger"
Post a Comment