让弹出窗口总是在最上面?我是在弹出的页面里这样做的<body onblur="this.focus();">,但是弹出页面的控件都不好使了,例如:TextBox不能编辑,DropDownList下拉列表也不好使了.我不知道该怎么办了,一定让这个弹出也面在最上面.捆饶我10几天了.

解决方案 »

  1.   

    up,我也遇到过这样的问题,可惜没有解决,up...
      

  2.   

    <body onblur="this.focus();">这句意思是当窗口失去焦点的时候,获得焦点。但是你在这个页面选择了其他控件,它马上就失去焦点,然后就再抢回来。这样就冲突了。试试<body onload="this.focus();">,
      

  3.   

    对不起语句不通顺!!但是你在这个页面选择了其他控件,这个页面就失去焦点,然后它试图就再抢回来。这样就冲突了,导致其他控件老是得不到焦点试试<body onload="this.focus();">
      

  4.   

    <body onload="this.focus();">
    我用了,不好使.不起作用了.
      

  5.   

    TRY:     <body onblur="this.focus();">
      

  6.   

    <body onblur="this.focus();"> 
    我是这么用的啊
      

  7.   

    window.showModalDialog(url);这个可以,而window.open不能
      

  8.   

    window.showModalDialog(url);模式窗口可以的。..............
      

  9.   

    window.open是做不到这个效果的。
    用showModalDialog可以,不过在非IE下是没有作用的还有一种方法用层模似,做得好的话,效果肯定比上面的好下面帖下 showModalDialog 方法,需要的朋友可以看看showModalDialog Method  Internet Development Index --------------------------------------------------------------------------------Creates a modal dialog box that displays the specified HTML document.SyntaxvReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
    ParameterssURL Required. String that specifies the URL of the document to load and display. 
    vArguments Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object. 
    sFeatures Optional. String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values: 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). 
    center:{ yes | no | 1 | 0 | on | off } Specifies whether to center the dialog window within the desktop. The default is yes. 
    dialogHide:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window is hidden when printing or using print preview. This feature is only available when a dialog box is opened from a trusted application. The default is no. 
    edge:{ sunken | raised } Specifies the edge style of the dialog window. The default is raised. 
    help:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the context-sensitive Help icon. The default is yes. 
    resizable:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window has fixed dimensions. The default is no. 
    scroll:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays scrollbars. The default is yes. 
    status:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays a status bar. The default is yes for untrusted dialog windows and no for trusted dialog windows. 
    unadorned:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the border window chrome. This feature is only available when a dialog box is opened from a trusted application. The default is no. 
     Return ValueVariant. Returns the value of the returnValue property as set by the window of the document specified in sURL .ResA modal dialog box retains the input focus while open. The user cannot switch windows until the dialog box is closed.Because a modal dialog box can include a URL to a resource in a different domain, do not pass information through the vArguments parameter that the user might consider private. The vArguments parameter can be referenced within the modal dialog box using the dialogArguments property of the window object. If the vArguments parameter is defined as a string, the maximum string length that can be passed to the modal dialog box is 4096 characters; longer strings are truncated.As of Microsoft&reg; Internet Explorer 4.0, you can eliminate scroll bars on dialog boxes. To turn off the scroll bar, set the SCROLL attribute to false in the body element for the dialog window, or call the modal dialog box from a trusted application.Internet Explorer 5 allows further control over modal dialog boxes through the status and resizable values in the sFeatures parameter of the showModalDialog method. Turn off the status bar by calling the dialog box from a trusted application, such as Microsoft Visual Basic&reg; or an HTML Application (HTA), or from a trusted window, such as a trusted modal dialog box. These applications are considered to be trusted because they use Internet Explorer interfaces instead of the browser. Any dialog box generated from a trusted source has the status bar turned off by default. Resizing is turned off by default, but you can turn it on by specifying resizable=yes in the sFeatures string of the showModalDialog method.You can set the default font settings the same way you set Cascading Style Sheets (CSS) attributes (for example, "font:3;font-size:4"). To define multiple font values, use multiple font attributes.The default unit of measure for dialogHeight and dialogWidth in Internet Explorer 4.0 is the pixel; in Internet Explorer 5 it is the em. The value can be an integer or floating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For consistent results, specify the dialogHeight and dialogWidth in pixels when designing modal dialog boxes.Although a user can manually adjust the height of a dialog box to a smaller value —provided the dialog box is resizable —the minimum dialogHeight you can specify is 100 pixels.To override center, even though the default for center is yes, you can specify either dialogLeft and/or dialogTop.
      

  10.   

    为什么不用showmodedialog()
      

  11.   

    大家都说用模式窗口window.showModalDialog(url) 我用了模式窗口但是里面的服务器控件看不到了,请问为什么啊,继续关注,