<!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> JavaScript使网页显示动态效果并实现与用户交互功能。</p>
<script type="text/javascript">
var myuse=document.getElementById("con");
myuse.style.color="red";
myuse.style.backgroundColor="#CCC";
myuse.style.display="block";
</script>
</body>
</html>
语法:
Object.style.property=new style;
语法:
Object.style.display = value;
none 隐藏 block 显示
我也是,不过还有印象,多写写就会记住的
同感……不过你好用心~
我也是,忘干净了