ie document.getElements ByClass Nameの失効方法を解決します.
520 ワード
if(!document.getElementsByClassName){
document.getElementsByClassName=function(cls){
var ret=[];
var els=document.getElementsByTagName("*");
for(var i=0;i=0 ||els[i].className.indexOf(cls+" ") ||els[i].className.indexOf(" "+cls+" ") ||els[i].className.indexOf(" "+cls)){
ret.push(els[i]);
}
}
return ret;
}
}