+ 1
How to place js content (date object) inside an HTML element..basically a div container...?!!
5 Answers
+ 1
Html :-
<div id="clock"></div>
JS:-
var det= document.getElementById("clock");
det.innerHTML(datText);
+ 1
Any doubt
+ 1
<div id="time"></div>
<script type="text/javascript">
var c=new Date();
var a=c.getHours();
var b=c.getMinutes();
document.getElementById("time").innerHTML=""+a+","+b+"";
</script>
+ 1
Hey thanq soo much.. it worked...
0
Dude it's throwing an error.. showing...
getElementById isn't a function