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