运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> </head> <body> <p>Click the button to create a STYLE element, and place it in the head section.</p> <button onclick="myFunction()">Try it</button> <p>The created style element contains css declarations that will change the font properties of this document.</p> <script> function myFunction() { var x = document.createElement("STYLE"); var t = document.createTextNode("body {font: 20px verdana;}"); x.appendChild(t); document.head.appendChild(x); } </script> </body> </html>