【发布时间】:2021-06-09 19:09:05
【问题描述】:
我已尝试使用以下代码:
$.get("/a.php?op=ajax§ion=b&cat_name=" + name.replaceAll("%", "")) + "&a=" + aname.replaceAll("%", "_"),function(resp) {
});
在我的name 值中包含多个& 符号。那时我无法传递完整的值,因为当出现一个 & 符号时,它会破坏我的数据。
例如我的name = 'DisplayPort & Mini DisplayPort Connector'
我只得到了“DisplayPort”。我没有得到剩余的部分。
【问题讨论】:
标签: javascript php json ajax