var isHidden = function (element) { return (element.offsetParent === null);};eg: 转载于:https://www.cnblogs.com/ecmasea/p/9225082.html