<!DOCTYPE html>
<html>
<body>
<h2>GeeksforGeeks</h2>
<h3>onClick Event Attribute</h3>
<span>Click the button to see the date & time.</span>
<button onclick="getElementById('time').innerHTML= Date()">
Show Date
</button>
<p id="time"></p>
</body>
</html>