<html> <body> <button onclick="var myDate = new Date(); alert(myDate.getMilliseconds());"> get milliseconds </button> </body> </html>