How To Show Time In Your Blog Or Website
- Open Notepad
- Create Javascript File
- Then Type In Javascript File
- Type
var d=new Date();
var curHour=d.getHours();
var curMinute=d.getMinutes();
var curSecond=d.getSeconds();
var ampm;
if(curHour<12)
{ ampm="AM"; }
else{ ampm="PM"; }
if(curHour==0)
{ curHour=12; }
if(curHour>12)
{ curHour=curHour-12; }
document.write(curHour+":"+curMinute+":"+curSecond+" "+ampm); 12>
Post a Comment