W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h1>设置 HTML</h1> <div id="01"> <h2>Hello China!</h2> </div> <div id="02"> <h2>Hello World!</h2> </div> <p id="demo"></p> <script> var myElement = document.getElementById("02"); myElement.innerHTML = "<h2>Hello Shanghai!</h2>"; </script> </body> </html>