Damian34
8.06.2010, 20:26:24
Mam pytanie jakie to są węły tekstowe w JavaScript?
Chodzi mnie tutaj o zastosowanie nodeValue
sprawdzalem p i span, one zwracaja type = 1 a nie 3 przy zastosowaniu nodeType
skowron-line
8.06.2010, 20:55:36
http://www.javascriptkit.com/domref/nodetype.shtmlCytat
<div id="adiv"> <b>Some text</b></div>
<script type="text/javascript">
alert(document.getElementById("adiv").nodeType) //DIV element. Alerts 1
alert(document.getElementById("adiv").firstChild.nodeType) //Alerts 1 or 3, depending on browser.
</script>