时间:2021-07-27 08:18:38 | 栏目:JavaScript代码 | 点击:次
要转化的键值对字符
var respDesc=“cardid=64157001&cardnum=1&sporder_id=PD12160428120635001&sporder_time=20160526101552”; var newstr = respDesc.replace("=",":\""); var stringObj= "{" +newstr.replace("&","\",") + "\"}";