<!DOCTYPE HTML><html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>修改html样式</title> </head> <body> <p id="con">hello</p> <script type="text/javascript"> var mycon = document.getElementById("con"); mycon.style.color="red"; mycon.style.fontSize=20; //这条语句没有识别到,是什么原因呢? mycon.style.backgroundColor="blue"; </script> </body></html>
添加回答
举报
0/150
提交
取消