代码如下:

//语法:prev(element)
//参数:element对象
//返回:对象在当前级别中是第几个元素,从1开始
//2010-08-26 15:13:55
function prev(elem,cont) {
if(!cont){cont=1}
elem = elem.previousSibling;
if(elem){return prev(elem,(cont+1))}
return cont
}

prev($("ext-gen232"))
08-26 13:11