W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <body id="myid"> <script type="text/javascript"> x=document.getElementsByTagName('body')[0]; document.write("Body id: " + x.id); document.write("<br />"); document.write("An alternate way: "); document.write(document.getElementById('myid').id); </script> </body> </html>