ITPub博客

首页 > 应用开发 > > 求助前端大神,以下代码哪里出错了?

求助前端大神,以下代码哪里出错了?

作者:wghdd 时间:2019-09-24 14:31:44 0 删除 编辑
<!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/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 语句没有输出
请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    109
  • 访问量
    866