前几天在csdn上找到的,你试一下!:)
使用close()命令在关闭主窗口时会出现是否关闭的提示,怎样让这个提示不出现?  
---------------------------------------------------------------  
 
window.opener=null;window.close();  
---------------------------------------------------------------  
 
<Script>  
window.opener=null  
window.close();  
</Script>  
必须在IE5.5以上版本有效  
---------------------------------------------------------------  
 
//IE6+SP1以下有效  
<OBJECT  id=closeit  classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">  
<PARAM  NAME="Command"  VALUE="Close"></OBJECT>  
<a  href="javascript:closeit.Click()">点这里关闭窗口</a>  
 
//IE5.5以上有效  
<input  type=button  value=关闭  onclick="window.opener='null';window.close()">  
 
//IE5.5以上有效  
<OBJECT  id=WebBrowser  classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2  height=0  width=0></OBJECT><input  type=button  value=关闭窗口  onclick=document.all.WebBrowser.ExecWB(45,1)>

解决方案 »

  1.   

    function win(url){
    window.open(url,"newwin","menubar=no,toolbar=no,scrollbars=yes,status=no,left=0,top=0,height="+screen.height+",width="+screen.width);
    } <td width="100%" class="list"><img src="/img/book.gif" border="0"> <a class="t" href="javascript:win('/code/form/check/num.htm')">打开无边窗口</a></td>
      

  2.   

    把如下代码加入<body>区域中
     <script language=javascript>minimizebar="minimize0826.gif";   
    minimizebar2="minimize20826.gif"; 
    closebar="close0826.gif";         
    closebar2="close20826.gif";       
    icon="icon0826.gif";              function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr)  
    {
      var contents="<html>"+
                   "<head>"+
            "<title>"+titleWord+"</title>"+
       "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">"+
       "<object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='Command' value='minimize'></object>"+
       "</head>"+
                   "<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+
       "  <table height=100% width=100% cellpadding=0 cellspacing=1 bgcolor="+titleBg+" id=mainTab>"+
       "    <tr height=18 style=cursor:default; onmousedown='x=event.x;y=event.y;setCapture();mainTab.bgColor=\""+moveBg+"\";' onmouseup='releaseCapture();mainTab.bgColor=\""+titleBg+"\";' onmousemove='if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);'>"+
       "      <td width=18 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+
       "      <td width="+w+"><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+
       "      <td width=14><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></td>"+
       "      <td width=13><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></td>"+
       "    </tr>"+
       "    <tr height=*>"+
       "      <td colspan=4>"+
       "        <iframe name=nbw_v6_iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+
       "      </td>"+
       "    </tr>"+
       "  </table>"+
       "</body>"+
       "</html>";  pop=window.open("","_blank","fullscreen=yes");
      pop.resizeTo(w,h);
      pop.moveTo((screen.width-w)/2,(screen.height-h)/2);
      pop.document.writeln(contents);  if(pop.document.body.clientWidth!=w||pop.document.body.clientHeight!=h)  //如果无边窗口不是出现在纯粹的IE窗口中
      {
        temp=window.open("","nbw_v6");
    temp.close();
    window.showModalDialog("about:<"+"script language=javascript>window.open('','nbw_v6','fullscreen=yes');window.close();"+"</"+"script>","","dialogWidth:0px;dialogHeight:0px");
    pop2=window.open("","nbw_v6");
        pop2.resizeTo(w,h);
        pop2.moveTo((screen.width-w)/2,(screen.height-h)/2);
        pop2.document.writeln(contents);
    pop.close();
      }
    }
    </script><!----------------- 实例一(按钮),修改参数可改变窗口样式 ----------------->
    <button onclick=noBorderWin('test0826.html','400','240','#000000','#333333','#CCCCCC','一个无边窗口的测试例子','yes');>open</button><br><br><!----------------- 实例二(链接),修改参数可改变窗口样式 ----------------->
    <a href=#none onclick=noBorderWin('test0826.html','400','240','#000000','#333333','#CCCCCC','一个无边窗口的测试例子','yes');>open</a><br><br><!----------------- 实例三(图片),修改参数可改变窗口样式 ----------------->
    <img src=none height=30 width=60 alt=open style="cursor:hand" onclick=noBorderWin('test0826.html','400','240','#000000','#333333','#CCCCCC','一个无边窗口的测试例子','no');>无滚动条的