主页面代码:<frameset onload="javascript:goToApp('myportal');" name='topmain' framespacing="0" border="0" frameborder="0" rows="203,*,76">
<frame name="top" scrolling="no" noresize target="contents" src="<%=logoPath%>top.jsp">
<frameset name="leftmain" cols="276,7,*">
<frame name="contents" target="main" scrolling="no" src="<%=logoPath%>yyleft.jsp">
<frame name="turn_left" id="turn_left" scrolling="no" noresize target="contents" src="<%=logoPath%>turn_left.html">
<frame name="main" src="<%=logoPath%>yyright.html">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="<%=logoPath%>bottom.jsp">
<noframes>
<body> <p>此网页使用了框架,但您的浏览器不支持框架。</p> </body>
</noframes>
</frameset>top.jsp代码:
<li class="yw"><a href='#' id='APP.IBUSS' onclick="refrechLeft('APP.IBUSS');"></a></li>function refrechLeft(menuGroupName,obj){
window.parent.contents.location = 'yyleft.jsp?menuGroupName='+menuGroupName;
}问题是:第一次点击top.jsp中的链接时, main的页面跳转为top.jsp本身了,第二次点击链接才跳转到理想的页面。如此循环往复;请教是什么问题造成的?

解决方案 »

  1.   

    main的页面跳转为top.jsp本身是因为href='#' ,(第二次点击链接才跳转到理想的页面),没有理解这句话是什么意思?理想的页面是指?
      

  2.   

    理想的页面是指:正常跳转到yyleft.jsp页面。
      

  3.   

    top 中的 target="contents"  改为target="main" 
      

  4.   


    抱歉问题有误,应该是:
    第一次点击top.jsp中的链接时, contents的页面跳转为top.jsp本身了,而不是yyleft.jsp页面,第二次点击链接才跳转到yyleft.jsp页面。再次点击时又跳转为top.jsp页面,如此循环往复;请教是什么问题造成的?
      

  5.   

    果然是href='#'的问题,改为JavaScript:void(0);可以了。。谢谢