弹出窗口时,在父窗口另起一个层(div),z-index设置为最高,大小占满正屏,键盘的keydown=retufn false;
当子窗口关闭时,恢复一切。

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head><body>
    <script type="text/javascript">

    function fOpWin(){
    n=open('','namethis','width=200,height=200')
    n.focus();
    }

    function fClsWin(){
    n.close();
    }
    document.onmousemove=function(){
    try{
    n.focus();
    } catch(e){}
    }</script>
    <a href="#" onClick="fOpWin();">popup window</a><br>
    <a href="#" onClick="fClsWin();">close window</a><br></body>
    </html>
      

  2.   

    最简单得方法:void window.open();
      

  3.   

    问一下,用showModalDialog方法,怎样能控制窗口大小和窗口标题内容??
      

  4.   

    vReturnValue = window.showModelessDialog(sURL [, vArguments] [, sFeatures])
    sFeatures:
    dialogHeight:sHeight Sets the height of the dialog window (see Res for default unit of measure). 
    dialogLeft:sXPos Sets the left position of the dialog window relative to the upper-left corner of the desktop. 
    dialogTop:sYPos Sets the top position of the dialog window relative to the upper-left corner of the desktop. 
    dialogWidth:sWidth Sets the width of the dialog window (see Res for default unit of measure). 标题由sURL指向的页面的标题确定。
      

  5.   

    学习,谢谢btbtd,对我很有帮助