日期:2014-05-16  浏览次数:20370 次

请高手赐教:我想在一个框架内,将页面A的表单数据提交给页面B,用javascript怎么写?能不能配合html代码给出完整一点的例子?请高手指点
框架: <frameset   rows= "66,* "   cols= "* "   frameborder= "no "   border= "2 "   framespacing= "0 ">
  <frame   src= "a.html "   name= "a "   id= "a "   title= "sub_menu "   />
                    <frame   src= "b.html "   name= "b "   id= "b "   title= "name "   />

页面a.html
      <form   id= "form1 "   name= "form1 "   method= "post "   action= " ">
            <input   type= "hidden "   name= "mailUID "   value= " <%=mailUID%> "/>
            <input   type= "checkbox "   name= "maillistNO "   value= "checkbox "/>
            <input   type= "hidden "   name= "itemNum "   value= " <%=i%> "/>
      </form>

页面b.html

<div   id= "sub_menu ">
    <ul>
          <li   class= "menu "> <img   src= "images/new/sc.jpg "   width= "51 "   height= "16 "   onclick= "javascript:submitform(); "/> </li>
      </ul>
</div>

通过点击页面b.html的图片获得页面a.html的表单内容,怎么做啊?请高手指导!!

------解决方案--------------------
将form的target设成目标框架的名字
<form target= "b " ...
------解决方案--------------------
楼上的是正解。