Response.Write("<script>window.alert('对不起!参数不合法');window.opener=null;window.close();</script>"); 这代码在正常的 .cs 文件中是能执行的。可是我使用了 ajax 后,有一个 timer 控件,在他的事件中确执行不了这代码,如下:
 protected void Timer1_Tick(object sender, EventArgs e)
{
        Response.Write("<script>window.alert('对不起!参数不合法');window.opener=null;window.close();</script>");
        
} IE 提示出错信息如下图: