response.setContentType ( "text / xml; charset = UTF-8");
response.setContentType ( "text / xml; charset = UTF-8");
PrintWriter out = null; (the order must not be the other way around)
At this time in the mass of the past will not be garbled.
For example, client is I (ajax way to the post)
function deleteBooktypeByTid (tid, row)
(Var flag = confirm ( "\ u786e \ u5b9a \ u8981 \ u5220 \ u9664 \ u56fe \ u4e66 \ u7c7b \ u522b \ u53f7 \ u4e3a \ uff1a" + tid + "\ u7684 \ u56fe \ u4e66 \ u5417 \ uff1f \ n \ u8fd9 \ u4e2a \ u64cd \ u4f5c \ u4f1a \ u5220 \ u9664 \ u8fd9 \ u4e2a \ u7c7b \ u522b \ u7684 \ u6240 \ u6709 \ u56fe \ u4e66 \ u54e6 ");
if (! flag) (return false;)
var tid = tid;
var row = row;
var url = "deleteBooktypeByTid.do";
var postStr = "booktype =" + tid;
postStr = encodeURI (postStr);
postStr = encodeURI (postStr);
(Tens of millions of these two changes have forgotten, if forgotten from the client to the server may be garbled pyronaridine)
var ajax = false;
if (window.XMLHttpRequest)
(Ajax = new XMLHttpRequest ();
if (ajax.overrideMimeType)
(Ajax.overrideMimeType ( "text / xml");)
)
else
(If (window.ActiveXObject)
(Try
(Ajax = new ActiveXObject ( "Msxml2.XMLHTTP");
) Catch (e)
(Try
(
ajax = new ActiveXObject ( "Microsoft.XMLHTTP");
)
catch (e) ())))
if (! ajax) (window.alert ( "err."); return false;)
ajax.open ( "POST", url, true);
ajax.setRequestHeader ( "Content-Type", "application / x-www-form-urlencoded");
ajax.setRequestHeader ( "If-Modified-Since", "0");
ajax.send (postStr);
ajax.onreadystatechange = function ()
(
if (ajax.readyState == 4 & & ajax.status == 200)
(
alert (ajax.responseText);
document.getElementById ( "table_queryBooktype_id"). deleteRow (row);
)
)
) Then alert () out of a garbled message does not matter, unlike the above, then on to do so is likely to appear garbled.







