How can i get the time using JavaScript and render it to a specific <p> element in the html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i get the time using JavaScript and render it to a specific <p> element in the html

Web https://code.sololearn.com/W7EDP2bRZ0Bq/?ref=app

10th Aug 2020, 8:56 PM
LaLa Byte
LaLa Byte - avatar
2 Answers
+ 1
Use date object
10th Aug 2020, 9:01 PM
Abhay
Abhay - avatar
+ 1
You can doing it by using document.getElementById("id_name").innerHTML = d; d here is Date object that you can declare as var d = new Date();
10th Aug 2020, 10:45 PM
HBhZ_C
HBhZ_C - avatar