[]如何post发送json数据中包含&&特殊字符,怎么办?
下面用post方法请求一个数据方式如下:
var tj:any={"a":"123&&456", "b":"ccc"};
str="paramA="+JSON.stringify(tj);
//xhr.send("http:xxx.xxx.com","a=xxxx&b=xxx","post","text");
xhr.send("http:xxx.xxx.com",str,"post","text");
服务端解析的时候,paramA参数的值为:{"a":"123
剩下的被解析为另一个post变量了。
试了字符转义,没有用。
var tj:any={"a":"123&&456", "b":"ccc"};
str="paramA="+JSON.stringify(tj);
//xhr.send("http:xxx.xxx.com","a=xxxx&b=xxx","post","text");
xhr.send("http:xxx.xxx.com",str,"post","text");
服务端解析的时候,paramA参数的值为:{"a":"123
剩下的被解析为另一个post变量了。
试了字符转义,没有用。
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Laya_XS
赞同来自: