我的页面里有个定时器,定时执行一些操作,另外有些按钮,点击按钮的时候要求弹出对话框,我发现只要定时器开着,对话框不关在哪都弹不出来。我另外做了个小页面发现也是这样,代码如下。public partial class _Default : System.Web.UI.Page
{
static int i = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script language='javascript'>alert('弹出对话框!');</script>");
}
protected void Timer1_Tick(object sender, EventArgs e)
{
i++;
}
}
对这个页面进行简单的测试,发现就如我猜想的那样,只要定时器开着就弹不出对话框,麻烦各位帮帮小弟,最好能给个好的解决方法。感激不尽。
{
static int i = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script language='javascript'>alert('弹出对话框!');</script>");
}
protected void Timer1_Tick(object sender, EventArgs e)
{
i++;
}
}
对这个页面进行简单的测试,发现就如我猜想的那样,只要定时器开着就弹不出对话框,麻烦各位帮帮小弟,最好能给个好的解决方法。感激不尽。
{
Timer1.Stop();
Response.Write("<script language='javascript'>alert('弹出对话框!');</script>");
Timer1.Start(); }
Response.Write("<script language='javascript'>alert('当前已无新的订单!');</script>");
tmRcvMsg.Enabled = true;试了下,可是可以,但是当对话框出来的时候,页面全部编程白色了,也就是啥都没有了。 另外我把这个放到我需要用的页面上去,这个方法还是不行。