The submission of the form form uses post. Otherwise, all fields will be placed in the url parameters, and the Chinese will be garbled
when there is & will be truncated to solve the problem of truncated parameters with & connectors in URL parameters
http://jingyan.baidu.com /article/48b37f8d7870df1a6464888d.html
The following is an example of the JS method: a=encodeURIComponent(12&34)&b=56 It is especially suitable for passing ajax to dynamic scripts. In this way, when the script takes parameters, it will not be truncated. // NET encoding HttpUtility.UrlEncode(URL);
http://jzzjf.12333sh.gov.cn/jzzjf/login?dispatch=dologin
code
http://www.nacao.org.cn/html/jigou/31/310000 .html
url Some Chinese fields are garbled, some are processed =============== encodeURI(content), the rest is the
function jsonpCallback(token) {
var mobile =$("#mobile" in Java ).val();
var taskid=getFormatDate();
var data =random();
var content="Hello dear user, your verification code is "+data;
alert(taskid);
var url="http://10.1.67.253:8080/wondersSMS/sendSMS?content="+encodeURI(content)+"&phonelist="+mobile+"&taskId="+taskid+"&token="+token+"&sid=yfy";
alert(url);
var a=encodeURIComponent(url);
$.ajax({
type:"post",
url: "<%=webPath%>/system/users/msg.do?url="+a,
dataType: "json",
success: function (data) {
alert(data.token);
},
error: function (r) {
console.log(r);
}
});
}
});
get Chinese garbled/post
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326839408&siteId=291194637
Recommended
Ranking