码迷,mamicode.com
首页 > 编程语言 > 详细

Javascript操作元素属性方法总结

时间:2014-06-02 01:25:59      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <!--
        元素属性的操作
        第一种:oDiv.style.display="none";
        第二种:oDiv.style["display"]="none";
        第三种:Dom方式
 
        Dom方式操作元素的属性
        获取:getAttribute(名称);//99%一般用不着他
        设置:setAttribute(名称,值);
        删除:removeAttribute(名称);
        -->
</body>
</html>

  

Javascript操作元素属性方法总结,布布扣,bubuko.com

Javascript操作元素属性方法总结

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/alphafly/p/3763880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!