<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>style样式</title>
</head>
<body>
<h2 id="con">I love JavaScript</H2>
<p id="ds"> JavaScript使网页显示动态效果并实现与用户交互功能。</p>
<script type="text/javascript">
var mychar= document.getElementById("con");
mychar.style.color="red";
mychar.style.width="300px";
mychar.style.height="400px";
mychar.style.backgroundColor="blue";
</script>
<script type="text/javascript">
var myd=document.getElementById("ds");
myd.style.color="red";
myd.style.fontSize="60px";
myd.style.width="500px";
myd.style.backgroundColor="blue";
</script>
</body>
</html>
小东别院
2014-09-23
举报
0/150
提交
取消