+ 10

How to get time and date in js ?? Plzz explain and plzz solve the problem in code

Time and date in js https://code.sololearn.com/We35Ikf0BLnI/?ref=app

26th Sep 2020, 12:22 PM
Dipendra - avatar
1 Answer
+ 4
<script type ="text/javascript"> a= new Date(); var time = a.getHours()+a.getMinutes()+a.getSeconds(); document.getElementById("time").innerHTML = time ; </script> minutes and seconds not minute and second Also place script before closing body tag
26th Sep 2020, 12:28 PM
Abhay - avatar