Need help with my sample webpage


i need your help guys. I’m trying to put a realtime clock on my html with javascript but i dont know how to make it appear on the html Someone tell me what to do, you can check out my problem at my codebit titled “Some Webpage”.


you can use .html() to add stuff to a webpage:


i managed to do it but my html turned white.


i managed to do it but my html turned white.


.html() is a function, it requires parentheses to be called. And without argument it will get the context from the document, not the other way around, if you look in the documentation you will see:

$( "div" ).html( "<b>Wow!</b> Such excitement..." );

this will add the stuff to the webpage

on second thought, you might prefer text() (which will treat the added element as text, where as .html() treats it as html code)

you can also use JS and use the getElementById() function and .innerHTML

under no circumstance use document.write() it will overwrite anything in your document