ohandle.focus = true ;
试试行不行?

解决方案 »

  1.   

    如果不是一定要用window.open的话
    用这个吧<script> 
    onload = showModalDialog("abc.html","","dialogWidth:590px;status:'no'"); 
    </script> showModalDialog就可以有你要的效果
      

  2.   


    父窗口:
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <script  language=javascript> 
    function cc()
    {
    window.showModalDialog("bb.htm",window,"dialogWidth:545px;dialogHeight:335px;status=no;help=no")
    }
     </script>     
    <P>&nbsp;</P>
    <input type=button value="button" onclick="cc()">
    <br/>
    <br/>
    <input type=text name=txt value="test">
    </BODY>
    </HTML>bb.htm:
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <script  language=javascript>
    function ccc()
    {
    var par=parent.window.dialogArguments.document.all("txt");
    par.value="搞定了!";
    parent.close();
    }
     </script>  
    <input type=button value="button" onclick="ccc()">
    </BODY>
    </HTML>
      

  3.   

    不好意思,刚才发错了!
    更正:
    ohandle = howModalDialog("b.htm","SUB_WINDOW","dialogWidth:590px;status:'no'");
      

  4.   

    但是这样被打开的页要自身Submit的话可能不行。不用showModalDialog,其他的方法可不可以实现这种子窗口的功能?
    请教!
      

  5.   

    常见问题:
    1,如何在模态对话框中进行提交而不新开窗口?
    如果你 的 浏览器是IE5.5+,可以在对话框中使用带name属性的iframe,提交时可以制定target为该iframe的name。对于IE4+,你可以用高度为0的frame来作:例子,test6.htm
    ===================
    <script>
    window.showModalDialog("test7.htm")
    </script>test7.htm
    ===================
    if(window.location.search) alert(window.location.search)
    <frameset rows="0,*">
    <frame src="about:blank">
    <frame src="test8.htm">
    </frameset>test8.htm
    ===================
    <form target="_self" method="get">
    <input name=txt value="test">
    <input type=submit>
    </form>
    <script>
    if(window.location.search) alert(window.location.search)
    </script>
    2,可以通过http://servername/virtualdirname/test.htm?name=mxh方式直接向对话框传递参数吗?
    答案是不能。但在frame里是可以
      

  6.   

    用showModalDialog的方法限制很多,还是用window.open()的方法好一些.
    请那位高人指点一下,用window.open()的方法怎样才能使打开的子窗体在
    未关闭之前始终在父窗体的上面显示?
      

  7.   

    JamesLeeCH(浩男) 正是,正是.我也想问一下这个问题
    请高手们指教!谢谢!
      

  8.   

    showModalDialog,可以提交,没什么限制就看你怎么做了
      

  9.   

    不过还是用window.open的方法好一些.
      

  10.   

    showModalDialog可以在本窗口提交的,只不过得用frame来做就是了,我上边的回帖不是已经说了吗?
      

  11.   

    我不想用frame,我只想用window.open()方法!
      

  12.   

    showModalDialog绝对比window.open方便,而且参数传递也没问题
    做B/S信息系统,showModalDialog是最好的选择
    研究一下这个吧,别想用其他途径了,浪费时间
      

  13.   

    看看这个http://expert.csdn.net/Expert/topic/2008/2008471.xml?temp=.1616632
      

  14.   

    请问 chonboy(一只来自南方的羊) 如果要想在子窗体没有关闭的情况下,调用父窗体内的函数的话,应该怎样做呢?