rt

解决方案 »

  1.   

    如果该窗口是本脚本打开的,刚可以用string js = "<script>window.close();</script>";
    ClientScript.RegisterClientScriptBlock(this.GetType(), "myJS", js);
    如果该窗口不是由脚本打开的,可以试下面的代码string js = "<script>window.opener=null;window.close();</script>";
    ClientScript.RegisterClientScriptBlock(this.GetType(), "myJS", js);
    不过这代码在FF2和IE7下可能不起作用.针对这种情况,可以使用activex,但这个一般也是行不通的,因为要经客户允许调用activex
      

  2.   

    Rsponse.Write("<script>Window.clock()</script>");
      

  3.   

    QUOTE:谢谢,不过,"myJS"是什么?
    -------------------
    随便,只要是名就行.改成你喜欢的也行