hi guys, as a beginner
with tho following code there suppose to be a paragraph inserted between the body tags. Here the file i have written:
So far no code is inserted if i examine the source code...
<meta http-equiv="content-type" content="text/html;charset=utf-8">
var paRa= document.createElement("p");
var newText = document.createTextNode("This is waht i cant see!");
Thax a lot...
I assume you see the paragraph right? Just not when you click "view source". If you want to see it in the DOM, you and use Firefox or Chrome, right click, and select "Inspect Element".
I'm always up for networking with fellow web professionals. Connect with me on LinkedIn
if you like!
thanx vision...i think the problem is the order of the js code...it suppose to be inserted after the body tags...but i really would prefer a function in the <head> of the script...so far im not ready to do that and read some more stuff on that ;-P
must be after
Your paragraph would be there, but without the text added; you've added the paragraph to the DOM tree without adding the text to it first. Another problem could be that you've got your script running before the body loads.
Computer programmer / web developer.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)