<div class="codetitle"> <span><a style="CURSOR: pointer" data="54845" class="copybut" id="copybut54845" onclick="doCopy('code54845')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code54845"> <br>//语法:prev(element) <br>//参数:element对象 <br>//返回:对象在当前级别中是第几个元素,从1开始 <br>//<span class="sep">2010-08-26 15:13:55</span> <br>function prev(elem,cont) { <br>if(!cont){cont=1} <br>elem = elem.previousSibling; <br>if(elem){return prev(elem,(cont+1))} <br>return cont <br>} <br><br>prev($("ext-gen232")) <br> </div>