可以在后台代码里镶嵌JS 前台写好代码 function xxx() {------} Button事件:protected void button_Click(object sender, EventArgs e){//////前面写后台代码,后面镶嵌JS ClientScript.RegisterStartupScript(Page.GetType(), "", "xxx();", true);ScriptManager.RegisterStartupScript(gvwJOList, this.GetType(), "magin", "xxx()", true); }
时间: 2024-10-12 06:23:48