Display current date and time in html using java script

Display Current date and time using Javascript

Hello friends in this article we will learn JavaScript Date Objectst / How to diplay date/ time using javascript .

HTML

<p id="datetime"></p>

Javascript

<script>
var dt = new Date();
document.getElementById("datetime").innerHTML = dt;
</script>

Leave a Reply

avatar
  Subscribe  
Notify of