怎样让弹出的普通窗口(不是模态框)总在最前,除非关闭它

解决方案 »

  1.   

    a.htm<script>
    a = window.open("b.htm")
    window.onfocus = c
    function c()
    {
    if(a && a.open && !a.closed)
    {
    a.focus()
    }
    }
    </script>
    b.htm
    =========
    <script>
    window.onblur = c
    function c()
    {
    window.focus()
    }
    </script>
      

  2.   

    孟子方法好b.htm
    =========
    <script>
    window.onblur = c
    function c()
    {
    window.focus()
    }
    </script>是在窗口失去焦点时,focus 本窗口。但实际中可能会有各种异常情况,所以不能100%
      

  3.   

    我要的效果是跟模态框一样,net_lover(孟子E章) 的方法,仍然可以点到父窗体页面上的控件,对listbox还可以选中
      

  4.   

    to 我要的效果是跟模态框一样,net_lover(孟子E章) 的方法,仍然可以点到父窗体页面上的控件,对listbox还可以选中use "window.showModalDialog" to open your page
      

  5.   

    你可以在孟子的js方法上面添加一些啊,比如让打开窗口后让本窗体所有控件都disabled =true掉,关掉窗口后才disabled = false;
      

  6.   

    既然有这种需求,那为啥不用ShowModalDialog? 难道是怕被拦截了?