I have the follwing JavaScript.
You can write to the document with
document.write(" Just a javascript demo");
only once and it applies to the whole document. If you want to put you will have to add a class/id to it and then put text in that class/id.