frame中表单提交的问题

Visual00000000 2010-08-25 10:01:51
模拟个简单的例子

--------------------main.html-----------------------

<frameset cols="50%,50%">
<frame name="left" src="File:///F:/left.html"/>
<frame name="right" src=""/>
</frameset>


-------------------left.html-------------------------
<form id="form1" name="form1" method="post">
<input type="button" value="click" onclick="document.form1.submit();"/>
<input type="button" value="history" onclick="alert(top.frames['right'].history.length);"/>
</form>

在ie下,每次提交表单,history.length都会加1
但ff和safari下,每次提交表单,history.length都不变
怎样才能让ff和safari表现出和ie相同的行为呢?
...全文
238 4 打赏 收藏 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
jazzyfree 2010-08-25
  • 打赏
  • 举报
回复
<form id="form1" name="form1" method="post">

改为:

<form id="form1" name="form1" method="post" target="right">


试试
plzzz 2010-08-25
  • 打赏
  • 举报
回复
没处理过这样的事情.... 帮顶...
Visual00000000 2010-08-25
  • 打赏
  • 举报
回复
自己研究了一下,发现这种情况下提交表单,ff和safari并不会记录历史,可是怎么解决呢
Visual00000000 2010-08-25
  • 打赏
  • 举报
回复
要沉了,自己顶
本文深入解析了HTML中的框架元素和表单元素,涵盖了<frame>、<frameset>、frame>等框架相关元素的属性和用法,以及
、、