Exibir hora e data em JavaScript
<!DOCTYPE html>
<html>
<body>
<button type="button"
onclick="document.getElementById('display').innerHTML = Date()">
Click me to display Date and Time.</button>
<p id="display"></p>
</body>
</html>
Rick Astley