function getByClass(classname){
var nodes = document.getElementsByTagName('*'),
ret=[];
for(var i=0;iif(hasClass(nodes[i],classname))
ret.push(nodes[i]);
}
return ret;
}
function hasClass(node,className){
var names = node.className.split(/\s+/);
for(var i=0;iif(names[i]==className)
return true;
}return false;
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn