if (dt.Rows.Count > 0)
        {
            Response.Write("<script>alert('有新消息,请查收!');</script>");
            Response.Write("<script>window.open('../DS/MessageBox.aspx');</script>");
        }
页面pageload时判断数据是否存在,然后弹出提示框 打开新的窗口显示消息页提示框出来了  可是不打开新窗口  IE不报错 也没拦截新窗口  请大家帮助  能完成此功能 其他方法也可以  只要能弹出新窗口 加载页面并不是按钮触发事件

解决方案 »

  1.   

    直接这样 
    if (dt.Rows.Count > 0) 
            { 
                Response.Write(" <script>alert('有新消息,请查收!');window.open('../DS/MessageBox.aspx'); </script>"); 
               
            } 
      

  2.   

    给你个注册JS脚本的方法,很好用,提示并跳转。而且页面不会出现变形Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('上传失败,请重试!');location.replace('NewsBackground.aspx')", true);能看懂怎么用吧!