Tutorialspoint

JavaScript Date Object Sample Program

<html>

 <head>
 <title>JavaScript setSeconds Method</title>
 </head>

 <body>

 <script>
 var dt = new Date("December 30, 2017 11:20:25");
 dt.setSeconds( dt.getSeconds() + 10 );
 document.write( dt );
 </script>

 </body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.