关于ie浏览器无法识别js中getElementsByClassName问题,现通过以下方法,引用如下js /** *打印js对象详细信息 */ function alertObj(obj) { var description = ""; for ( var i in obj) { var property = obj[i]; description += i + " = " + property + "\n"; } alert(descript…
IE8以下版本没有getElementsByClassName这个方法,以下是兼容写法 function ieGetElementsByClassName() { if (!document.getElementsByClassName) { document.getElementsByClassName = function(className, element) { var children = (element || document).getElementsByTagName('*');…