innerHTML and nodeType

T

transkawa

on a markup such as this:
<p id="notme">my name is really not mine.</p>

when i did d.get....('id').innerHTML the nodeType returned was:
"undefined". can anyone help clarify my confusion. I thought it would
return a text node type or else an element node type. the dom says it
should return the markup of the child tag and that markup must be a node
type!!!
i must be mistaken somewhat about innerHTML??
xnt
 
S

Scott Sauyet

when i did d.get....('id').innerHTML the nodeType returned was:
"undefined". [ ... ]

If I parse your question correctly, you're wondering why the nodeType
property of the innerHTML property of a DOM element is undefined. If
that's the question, then the answer is simple: innerHTML returns a
*string*. The exact format of that string is implementation-defined,
but should be presumably be related to the DOM structure of the
element in question.

-- Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top