js判断display隐藏显示

// 判断是否为隐藏(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;

 

}

posted @ 2016-12-17 02:19  _即炤  阅读(8205)  评论(0编辑  收藏  举报