c#後臺alert出來變亂碼問題解決


                                string strScript = "<script charset='utf-8' Language=Javascript>if( confirm('參數存在不安全字符') ) {window.history.back(-1); } else { window.history.back(-1);}</script>";

                                StringBuilder sb = new StringBuilder();

                                sb.Append("<html>");

                                sb.Append("<head>");

                                sb.Append("<meta charset=\"utf-8\" />");

                                sb.Append(strScript);

                                sb.Append("</head>");

                                sb.Append("</html>");

                                System.Web.HttpContext.Current.Response.Write(sb);

                                System.Web.HttpContext.Current.Response.End();


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章