<html> <body> <button onclick="var myDate = new Date(); alert(myDate.getSeconds());"> Date: get Seconds </button> </body> </html>