This article mainly introduced the javasciprt jquery function $.post to perform the unresponsive solution, the need friend may refer to under
In the process of writing JAVASCIRPT program, the $.post method is used to send the data, if the characters contain ' < ', it will cause the $.post to be executed successfully. The code is as follows: Var jsonstr= ' {' value ': ' ABCD<EFG '} '; $.post (URL, {"Jsonstr": Jsonstr}, function (data, status) {}); It needs to be escaped and reused, after escaping with the following Transferredchars function, then passing the data $.post can be performed. This function replaces ' < ' and ' > ' respectively with ' < ' and ' > '. The code is as follows: Transferredchars=function (Htmlchars) {var TCS = Htmlchars.replace (/</g, "<"); TCS = Tcs.replace (/>/g, ">"); return TCS; The code is as follows: Var jsonstr= ' {' value ': ' ABCD<EFG '} '; Jsonstr=transferredchars (JSONSTR); $.post (URL, {"Jsonstr": Jsonstr}, function (data, status) {}); The jquery version used is 1.7.1.min