jquery如何获取某对象的所有css
时间:2009-08-04
来源:互联网
如题,我想获取下面这个div的所有css样式
我只知道: $("#sub_nav").css("name")是取名为name的css值,但是我如果想取这个id="sub_nav"所以css,该怎么写?
复制代码
|
我只知道: $("#sub_nav").css("name")是取名为name的css值,但是我如果想取这个id="sub_nav"所以css,该怎么写?
作者: yyg1982 发布时间: 2009-08-04
没有办法获取,除非你提供所有的css属性名进行遍历
DOM对象会用css进行渲染,最后得到的结果是计算出来的值,不是DOM本身的属性,所以无法遍历
想拿当前计算结果可以用这个方法,但我认为你不会这样去做
http://www.3648.com/article/sort02/sort0100/info-14776.html
最后想说的是,除了调试,你不会有这种需求,如果要调试的话,firebug和Chrome都支持
DOM对象会用css进行渲染,最后得到的结果是计算出来的值,不是DOM本身的属性,所以无法遍历
想拿当前计算结果可以用这个方法,但我认为你不会这样去做
http://www.3648.com/article/sort02/sort0100/info-14776.html
最后想说的是,除了调试,你不会有这种需求,如果要调试的话,firebug和Chrome都支持
作者: keakon 发布时间: 2009-08-04
这样好像不行
不过你可以换个方法嘛
添加同样的class
不过你可以换个方法嘛
添加同样的class
作者: haibin666 发布时间: 2009-08-04
Many non-governmental Replica Handbags beauty secret
Designer Handbags tips with small, AION Kina we are only
Aion gold to follow it Aion money blindly and did
Buy Aion Kina not notice something Buy Aion gold inherent in the
composition and texture of AION power leveling the individual physical
AION Items characteristics to Aion Account
meet TCT circular saw the hot pursuit carbide
saw blades of
Designer Handbags tips with small, AION Kina we are only
Aion gold to follow it Aion money blindly and did
Buy Aion Kina not notice something Buy Aion gold inherent in the
composition and texture of AION power leveling the individual physical
AION Items characteristics to Aion Account
meet TCT circular saw the hot pursuit carbide
saw blades of
作者: asdfjklmn 发布时间: 2009-08-14
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28