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;

 

}

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