When you click the Back button, the form in "iframe1" is re-submitted, look at the stages the browser passes through1. A.html contains an empty iframe, click TestButton in A.html
2. A.html now contains an iframe with B.html, but you are submitting a form inside B.html to the "_parent"
3. C.htmlso if you click Back button at stage 3, it will go back to stage 2 and it will get right back to 3

解决方案 »

  1.   

    您看,能有办法通过对history等对象的控制,可以解决我的问题吗?
      

  2.   

    history.go(-2) does not work in C.html, suggest you change the way pages are rendered
      

  3.   

    你可以在iframe的页面里使用:
    <a href="javascript:history.back(-1);">back</a>
      

  4.   

    我的意思是要实现,在A页面中做某种操作,触发一个处理,此处理由B文件来负责。通过处理判断后,迁移整个页面为C。此时我想实现点击后退按钮,一步从C页面回到A页面。好像也只有这样是合理的,因为用户仅看到了一次页面变化。诸位有什么好的实现方法吗?小弟先谢了!
      

  5.   

    你可以通过操作document.all.iframeID.src实现:<br>
    <iframe id=iframeID></iframe>
    <br>
    <a href="#" onclick='document.all.iframeID.src="a.htm"'>back</a>
      

  6.   

    孟子E章 您好:
    用上面的方法,我觉得可能还解决不了问题。
    现在的例子是我为说明问题而写的。
    主要的问题是,对用户点了IE的后退按钮,而退不回去,用户将感到很奇怪。
    我要么解决掉此问题,要么将history清空,这样回退按钮就会变灰,用户也就能理解了。不然的话,IE的后退按钮可以按下,但又退不回去,就显得不合理了。当然,我最希望能后退,关于您刚才的解答是在页面上添加后退功能,而我是想让
    IE的后退按钮,和平时那样回退(从页面的观感上来讲)
      

  7.   


    我想只有将history清空加上在页面上添加后退功能了,