getSeconds to collect Seconds

We can collect second from the date and time like this. Here is an example
var dt= new Date();
Here is the second part of your ( client ) computer date and time

We can also take Seconds part from any date variable.
var dt= new Date("Aug 15, 2013 13:52:45");
Output is here

Showing changing Seconds value

Here we are displaying the seconds value when the page loads. This value does not change on real time. So we will execute the code in every seconds to display the real changing seconds value. To execute the code repeatedly we will use setTimeout function which triggers in every 1000 mille seconds ( 1 second )
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