首页 > 应用开发 > > 求助前端大神,以下代码哪里出错了?
<!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>来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1775/viewspace-3149496/ ,如需转载,请注明出处,否则将追究法律责任。