码迷,mamicode.com
首页 > Web开发 > 详细

js判断display隐藏显示

时间:2016-12-17 07:35:02      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:gre   hid   样式   gray   mil   new   uri   ret   splay   

// 判断是否为隐藏(css)样式

function isHide(obj) {

 

var ret = obj.style.display === "none" ||

obj.style.display === "" ||

(obj.currentStyle && obj.currentStyle === "none") ||

(window.getComputedStyle && window.getComputedStyle(obj, null).display === "none")

 

return ret;

 

}

js判断display隐藏显示

标签:gre   hid   样式   gray   mil   new   uri   ret   splay   

原文地址:http://www.cnblogs.com/helkbore/p/6189012.html

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