源代码 :
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p id="intro">Hello World!</p> <script> x=document.getElementById("intro"); document.write(x.firstChild.nodeValue); </script> </body> </html>
运行结果