javaScript取顶层对象(HTML)

function _getRootFrameElement(){
    var b = window.self;
    while(true){
        if(window.top==b){return $(b);}
        b=b.parent;
    }
}

你可能感兴趣的:(javascript)