JavaScript DHTML/Javascript Objects/TextNode

Материал из Web эксперт
Версия от 10:23, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"TextNode" Example

   <source lang="html4strict">
   

<html> <head> <script> function replaceText(){

   var myTextNode = document.createTextNode("Text was replaced");
   var newTN = replaceMe.firstChild.replaceNode(myTextNode); 

} </script> </head>

This is some text that will be replaced

<button onclick="replaceText();">Replace text</button> </body> </html>


     </source>