Display Current Date & Time in JavaScript


<div id="message"></div>


<script>
document.getElementById("message").innerHTML = new Date();
</script>

Example: