在一个jsp里有两块iframe,如何让一个iframe的值传给另一个iframe,并且打印出这个值?各位帮忙啊

解决方案 »

  1.   

    怎么没人啊
    a.jsp
    <a href="www.sina.com?name=sina" onMouseOver="over('sina');">www.sina.com</a><p>
    <a href="www.sohu.com?name=sohu" onMouseOver="over('sohu');">www.sohu.com</a><p>
    <a href="www.163.com?name=163" onMouseOver="over('163');">www.163.com</a><div style="left: 216px; top: 80px; width: 410px; height: 335; position: absolute">
    <iframe src="iii.jsp" width=186 height=230 border=1 frameborder=0 framespacing=0 marginheight=1 marginwidth=1 noResize scrolling=no vspace="0" name="I3">
    </iframe>
    </div>
    通过鼠标的移动将sina,sohu或163这些值显示在iframe这块区域?
      

  2.   

    这段代码应该可以实现你的要求!(经过测试的)×××××××××××××××××××××××××××××××
    <a href="" onMouseOver="javascript:document.getElementById('I3').src='http://www.sina.com.cn'">www.sina.com</a><p>
    <a href="" onMouseOver="javascript:document.getElementById('I3').src='http://www.sohu.com'">www.sohu.com</a><p>
    <a href="" onMouseOver="javascript:document.getElementById('I3').src='http://www.163.com'">www.163.com</a>
    <br>
    <div style="left: 216px; top: 80px; width: 600px; height: 400; position: absolute">
    <iframe src="a.htm" width=600 height=400 border=1 frameborder=0 framespacing=0 marginheight=1 marginwidth=1 noResize scrolling=no vspace="0" name="I3" id="I3">
    </iframe>
    </div>
    ×××××××××××××××××××××××××××××××