ASPX 后台调用前台Js

一、UpdatePanel 使用中测试

protected void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = "测试时间:" + DateTime.Now.ToString();this

ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(),"testalert", "<script>Test();</script>", false);
}blog

二、UpdatePanel 没有使用ip

protected void Button1_Click(object sender, EventArgs e)
{
    this.Label1.Text = "测试时间:" + DateTime.Now.ToString();
    ClientScriptManager cs = this.ClientScript;
    cs.RegisterStartupScript(this.GetType(), "HelloWorld", "<script>alert('test alert');</script>");
}test

 

源代码下载:http://files.cnblogs.com/tianjinquan/WebReportJS.zipobject

相关文章
相关标签/搜索