vote.jsp<%@page language="java" contentType="text/html;charset=GBK"%>
<link href="../style.css" rel="stylesheet" type="text/css" />
<table width="153" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="237" background="../image2/investigate_1.jpg"><table width="92%" border="0" align="center" cellpadding="0" cellspacing="2">
<form name="votefrm" method="post" action="../vote/writor.jsp" target="_blank">
<tr>
  <td height="10"></td>
</tr>
<tr>
<td align=center><input type=submit value="投 票">&nbsp; 
   <input name="button" type=button onClick="javascript:window.open('../vote/writor.jsp')" value="查 看"></td>
</tr>
</form>
</table></td>
  </tr>
</table>
writor.jsp:
<html><body onload="window.open ('vote.jsp', 'newwindow', 'height=450, width=680, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no, blackcolor=ffffff');opener=null; window.close(); "></body></html>把两个文件放在vote文件夹就可以测试,当点投票就要提示关闭,点查看就不提示,不知道什么原因?

解决方案 »

  1.   

    <form name="votefrm" method="post" action="../vote/writor.jsp" target="_blank">把target=_blank去掉
      

  2.   

    关闭时屏蔽提示对话框的方法
    function closeWindow(){
      window.opener='xxx';//可以是任何值
      window.close();
    }当要关闭的窗口是通过别的窗口中的脚本打开时,可以直接关闭,不提示
    这里就是要造出这种假相
      

  3.   

    你点投票可能是要关闭本窗口(vote.jsp)才提示还是关闭writor.jsp提示? 点击查看关闭writor.jsp了吗?没有提示?   如果是关闭本窗口得提示,那应该是你的target="_blank"没起作用。
      

  4.   

    关闭writor.jsp提示的,target="_blank"没起作用的话writor.jsp就不会新跳出来了
      

  5.   

    不知道具体什么问题,我这里点两个btn都可以关闭writor.jsp 而且没有提示,还有人试过吗? ie版本问题???