我不明白为什么在 ajax 中“+”号会转换为“”。请解释一下?
Use the encodeURIComponent()函数将您的数据转换为请求的有效编码数据:
encodeURIComponent()
xhr.open("POST", url, true); xhr.send(encodeURIComponent(postdata));