W3School TIY
(请在下面的文本框中编辑您的代码,然后单击此按钮测试结果。)
编辑您的代码:
<!DOCTYPE html> <html> <body> <p id="p1">Hello World!</p> <p id="p2">Hello World!</p> <script> document.getElementById("p2").style.color="blue"; document.getElementById("p2").style.fontFamily="Arial"; document.getElementById("p2").style.fontSize="larger"; </script> <p>上面的段落已被一段脚本修改。</p> </body> </html>
查看结果: