<html> <body> <button onclick="var myDate = new Date(); alert(myDate.toLocaleString());"> Locale String </button> </body> </html>