HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to display UTC seconds of the current date.</p> <button onclick="myFunction()">Display UTC Seconds</button> <p id="point"></p> <script> function myFunction(){ var d = new Date(); var n = d.getUTCSeconds(); document.getElementById("point").innerHTML = n; } </script> </body> </html>
OUTPUT
×

Save as Private