document.lastModified of a page

WE can collect the last modified or created date of the current file by using document object lastModified property.
Here is the syntax
The above command is case sensitive

The output of current page is here Here is the complete code for you to try.
<script type="text/javascript">


Creating Date object

Date Object and formats
<script type="text/javascript">
var dt= new Date(document.lastModified) // Date object 
var str=dt.getDate() +'/'+dt.getMonth()+'/'+dt.getFullYear() // date/month/year 
document Object Sending output to screen
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer