Add HTML Javascript date and time to your web site

Are you new to Java script? You are  building a web site and you are wanting to add the current date and year on your web page.  so you are in right place just copy and paste this script



 <script language="javascript">   
 months = ['January','Febraury','March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];   
 var d=new Date();  
 var weekday=new Array(7);  
 weekday[0]="Sunday";  
 weekday[1]="Monday";  
 weekday[2]="Tuesday";  
 weekday[3]="Wednesday";  
 weekday[4]="Thursday";  
 weekday[5]="Friday";  
 weekday[6]="Saturda";  
 var d = new Date();  
 (d.getFullYear());  
 var theDate = new Date(document.lastModified);   
 theDate.setTime((theDate.getTime()+(60*60)) )   
 with (theDate) {   
 document.write("Last updated :&nbsp;&nbsp;&nbsp;&nbsp;"+weekday[getDay()]+' '+getDate()+' '+months[getMonth()]+' '+d.getFullYear()+" ")   
 }   
 </script>  
Add HTML Javascript date and time to your web site Add HTML Javascript  date and time to your web site  Reviewed by Unknown on 11:21 PM Rating: 5
Powered by Blogger.