W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h1>显示 HTML 元素</h1> <h2 id="01" style="display:none">Hello World!</h2> <h2 id="02" style="display:none">Hello China!</h2> <h2 id="03" style="display:none">Hello Shanghai!</h2> <script> var myElement = document.getElementById("02"); myElement.style.display = ""; </script> </body> </html>