document.getElementsByClassName = function(name){ try{ var tag = document.getElementsByTagName("*") || document.all; var array = []; for (var i = 0; i < tag.length; i++) { if(tag[i].className == name){ array.push(tag[i]); }; }; if(array.length >= 1){ return array[0]; } return array; }catch(e){} }
时间: 2024-11-13 06:32:24