我的java历程

netscape 中使用iframe,对form中target的使用

我有下面一段程序:
1.jsp中:
<form name="form1" method="post" action="2.jsp" target="heart">
    <input type="submit" name="download"/>
</form>
<iframe marginwidth=0 marginheight=0 name="heart" frameborder="no" scrolling="no" width=0 height=0 style="display:none">

2.jsp中只做一些java处理,没有html之类的东西输出,而处理后的值返回iframe,但我现在点击按钮后,弹出新的空白窗口2.jsp。  
  请高手指教如何修改,使得点击按钮后在iframe内显示2.jsp,而不会弹出新的空白窗口2.jsp。

另外我通过测试发现:在IE6,IE7,NETSCAPE7.1这几个浏览器中,都实现了我所希望的功能(点击按钮后,将值返回到iframe,但不弹出新的空白窗口2.jsp),可是NETSCAPE7.02却不行,不知道是为什么。

请高手指教,先谢谢各位了。

posted on 2008-06-11 18:08 landril 阅读(1324) 评论(1)  编辑  收藏 所属分类: Jsp&Servlet

Feedback

# re: netscape 中使用iframe,对form中target的使用[未登录] 2008-06-23 12:39 landril

这个我知道是什么原因了,呵呵
将style="display:none"删掉即可
或者将其改成以下也行:
style="visibility:visible"(显示)
style="visibility:hidden"(隐藏)  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: