本帖最后由 shuwenguang 于 2011-07-08 12:12:08 编辑

解决方案 »

  1.   

        $(document.body).scrollTop(200); //值是多少就要计算了.
      

  2.   

    网上查锚点的用法 easy的很
      

  3.   

    document.getElementById("ID").focus();
      

  4.   

    父页面(parent.jsp):
    <div class="DIV"><a href="javascript:menu('Tab1');">侵害人员</a></div><iframe src='jsp/child.jsp' id="NR" name='NR' frameborder="0"  style="overflow: auto;" width="100%" height="100%"></iframe>function menu(tabId){
       document.frames["NR"].window.getTableCoordinate(tabId);
    }子页面(child.jsp):
    <table id="tab1">
    <tr><td></td></tr>
    </table>//获取元素的纵坐标 
    function getTop(e){ 
            var offset=e.offsetTop; 
    if(e.offsetParent!=null) offset+=getTop(e.offsetParent); 
          return offset; 


    function getTableCoordinate(tabId){ 
    var obj = document.getElementById(tabId); 
    var top=getTop(obj)-150;
    $(document.body).scrollTop(top);
    }