编辑下面的代码:【加编码】
<html> <body> <p id="intro">你好世界!</p> <p>该实例展示了 <b>getElementById</b> 方法!</p> <script> x=document.getElementById("intro"); document.write("<p>文本来自 id 为 intro 段落: " + x.innerHTML + "</p>"); </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂