<!DOCTYPE html>
<html>
<head>
<script>
function TimeDate()
{
document.getElementById("td").innerHTML=Date();
}
</script>
</head>
<body>
<div id="td">The time and date will appear here!</div>
<button type="button" onclick="TimeDate()">Show Time & Date</button>
</body>
</html>