用vb.net或者c#.net的方式都可以。。 showModalDialog的关闭是个问题如何在执行完一个动作后关闭它。 
提示:点击按钮触发调用showModalDialog,等按钮的,可以等Thread.Sleep(5000)这个做等待 ..

解决方案 »

  1.   

    你的程序是web应用还是桌面应用呀?
    另外你是希望在父窗口中关闭还是子窗口子子闭呀?
      

  2.   

    是web程序。希望子窗口“showModalDialog的关闭”让弹出的关闭
      

  3.   

    <head runat="server">
    <base target="_self"/>
        <title>添加基本的发货信息</title>
        <link href="../css/main.css" rel="stylesheet" type="text/css" />在跳出的页面HEAD里面加<base target="_self"/> 你看看 行不行 不行联系我啊
      

  4.   

    "在跳出的页面HEAD里面加 <base target="_self"/> "如何关闭???
      

  5.   

    你要的是不是这样的效果?parentWnd.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>Untitled Document</title>
        </head>
        <body>
            <h1>父窗口</h1>
            <input type="button" value="open" onclick="window.showModalDialog('childWnd.html');">
        </body>
    </html>
    childWnd.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head>
    <script language="javascript">
    var t = 10;
    window.onload=function(){
    count();
    }

    function count(){
    if (t <= 0) {
    window.close();
    return;
    }
    div1.innerHTML = t + "秒";
    --t;
    window.setTimeout("count()",1000);
    }
    </script>
    <body>
        <h1>子窗口</h1>
    <div id="div1"></div>
    </body>
    </html>
      

  6.   

    用setInterval要简单些.childWnd.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head>
    <script language="javascript">
    var t = 10;
    window.onload=function(){
    setInterval("count1()",1000);
    } function count1(){
    div1.innerHTML = t + "秒";
    --t;
    if(t<=0){
    window.close();
    }
    }
    </script>
    <body>
        <h1>子窗口</h1>
    <div id="div1"></div>
    </body>
    </html>
      

  7.   

    谢谢楼上朋友。。这个是用定时关闭的方法。。关键是我也不知道删除具体需要的时间。。最好是后台删除后就能直接调用前台js关闭showModalDialog!
      

  8.   

    如果你的处理是在了窗口调用的话,
    如果是使用ajax,则在处理完成后调用window.close()就可以了。如果是通过表单提交的话,
    则在返回的窗口中直接写入。<script language="javascript">
    window.close();
    </script>