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