<html> <body> <button onclick="var myDate = new Date(); myDate.setMinutes(2); alert(myDate);"> Date: set Minutes</button> </body> </html>