模拟个简单的例子--------------------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相同的行为呢?
<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相同的行为呢?
试试