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