我想生成一个url连接,跳转到页面index.jsp中,index.jsp里面包含两个frame,我想跳转后打开页面的时候直接可以将frame中的页面设置为我想开得页面,同时带的参数传到frame中的页面接收,请问该怎么实现?

解决方案 »

  1.   

    譬如一个frame叫id="leftFrame",另一个叫id="rightFrame",那么,url链接写成<a href="xxx" target="rightFrame" >123</a>,就在rightFrame中显示你的链接了,至于参数,跟在地址后面即可!
      

  2.   

    网上这样实现的有很多,查看源代码分析一下就应该知道怎么做了。如:
    http://dzh.mop.com/mainFrame.jsp?url=http://dzh.mop.com/topic/readSub_9428810_0_0.html
    你的index.jsp输出类似如下内容就可以:
    <!--http://dzh.mop.com/mainFrame.jsp?url=http://dzh.mop.com/topic/readSub_9428810_0_0.html-->
    <html>
    <head>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <title>index.jsp</title>
    </head>
    <frameset cols="26%,*">
    <frame name="left" src="http://dzh.mop.com/c/6.html" target="right">
    <frame name="right" src=http://dzh.mop.com/topic/readSub_9428810_0_0.html>
    </frameset>
    </html>
    这个 right 的分帧页面 src 从 mainFrame.jsp 的输入参数 url 来获取
      

  3.   

    前提:<a href="index.jsp?参数=值&参数=值">链接</a>
    <frameset cols="80%,*">


    <frame src="message.jsp" name="message" />

    <frame src="userList.jsp" name="userList">
            <%
                                   String str = request.getParameter("参数名");
                            %>

    </frameset>

    <noframes></noframes>这够意思了吧 哥们儿
    希望对你有用哦
    ^_*