<p title="The test paragraph">This is a sample of some <b>HTML you might<br>have</b> in your document</p>
txt=document.getElementsByTagName("p")[0].childNodes[0].nodeValue;
alert("<p>The text from the intro paragraph: " + txt + "</p>");
它不起作用。childNodes中的html標記(我如何獲得NodesValue)
我怎樣才能獲得childNodes.nodevalue「這是一些HTML你可能也有文檔中的樣本」
它工作得很好。 – Jason 2010-03-10 15:46:00
非常感謝。這是工作 – Jason 2010-03-10 15:47:00