我想在我的 .cs 文件上调用 3 个 javascript 函数,我试过这个:
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
ClientScriptManager script = Page.ClientScript;
ClientScriptManager script2 = Page.ClientScript;
ClientScriptManager script3 = Page.ClientScript;
script.RegisterClientScriptBlock(this.GetType(), "key", "centerPopup1()", true);
script2.RegisterClientScriptBlock(this.GetType(), "key", "loadPopup1()", true);
script3.RegisterClientScriptBlock(this.GetType(), "key", "msg1()", true);
}
}
没有成功,我的回传没有任何反应,但如果我尝试只调用其中一个函数,它就可以工作。