W3School TIY
编辑您的代码:
<html> <body> <h1 id="header">旧标题</h1> <script type="text/javascript"> document.getElementById('header').innerHTML="新标题" </script> <p>请注意,原始的文本是“旧标题”。</p> </body> </html>
查看结果: