Untuk kode script widget Hari Tanggal Bulan dan Tahun
<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>
Untuk kode script widget Jam Waktu menit detik dan AM:PM
<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>
0 komentar:
Posting Komentar
👉Berkomentarlah yang sopan.. jangan membuat spam..
komentar berisi 👉promosi, judi, link video porno.. akan di hapus permanen.🚫