Last Updated Date in JavaScript

Use the following script to write the last updated date of the document.

The Code

<script>
 datUpdated = new Date(document.lastModified) ;
 datMonth = datUpdated.getMonth() + 1 ;
 datDate = datUpdated.getDate() ;
 datYear = datUpdated.getYear() ;
 document.write("<i>Last Updated: " + datMonth + "/" + datDate + "/" + datYear + "</i>") ;
 </script>

The Result



javascript last update time stamp


Back To Top
© 1998 - 2014 psacake.com | My3C's

Version 7.0a | Advertise on this site