在使用UpdatePanel時(shí)JS對(duì)話框出錯(cuò)的解決辦法。
將response.write(<script>alert('');</script>);換成
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "TestAlert", "alert('測(cè)試 alert !');", true);
就OK
將response.write(<script>alert('');</script>);換成
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "TestAlert", "alert('測(cè)試 alert !');", true);
就OK