日期:2014-05-17  浏览次数:20621 次

iframe中表单提交返回的页面问题
我页面中有2个iframe,在第一个iframe中的表单提交后,它刷新以后就变成了将当前整个页面放到了第一个iframe中,
我怎么才能让它只将自己的页面刷新返回!

------解决方案--------------------
下面代码你借鉴一下,这是防止跳转的页面嵌套在iframe/frame中的
if(top!=self){
if(top.location != self.location){
top.location=self.location; 
}
}

------解决方案--------------------
在form表单中加上target="你iframe的name值"