<div class="codetitle"> <span><a style="CURSOR: pointer" data="79087" class="copybut" id="copybut79087" onclick="doCopy('code79087')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code79087"> <br>//CLASS@Mr.Think*****getElementsByTagName <br>function tag(name,elem){ <br>if(!document.getElementsByTagName) return false; <br>return (elem || document).getElementsByTagName(name); <br>} <br> </div> <br>使用不做详述,若是用于获取整个文档中某指定标签集合,可直接用tag(“xx”)获取.