ZVON
>
References
>
DOM2 Reference
Intro
/
Search
/
ZVON
DOM2 reference
>
Core:
Document
>
createTextNode
[Go to standard]
[Glossary]
[Help]
createTextNode (method )
Owning interface and usage:
Document
.
createTextNode
(
data
)
Member of these other interfaces:
none
Description:
Creates a
Text
node given the specified string.
Parameters:
DOMString
data
-
The data for the node.
Returns:
Text
-
The new
Text
object.
Exceptions:
none
Example:
JavaScript:
var elem = document.createTextNode('This is some text.'); var output = elem.nodeValue;
Output:
desired
your browser
This is some text.