Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过&;(符号)在ajax get还是post方法中?_Ajax_Url_Post_Get_Query String - Fatal编程技术网

如何通过&;(符号)在ajax get还是post方法中?

如何通过&;(符号)在ajax get还是post方法中?,ajax,url,post,get,query-string,Ajax,Url,Post,Get,Query String,我有一个文本框来输入描述 如果我提交,需要通过ajax发送并存储在db中 问题:- Example text in textbox:- "Hi all & solve my problem" in the next page i am getting till "Hi all" Remaining text is missing, If I pass through get or post method using ajax. 给我答案。如何获取我放置在文本框中的所有内容以

我有一个文本框来输入描述 如果我提交,需要通过ajax发送并存储在db中

问题:-

Example text in textbox:-    "Hi all & solve my problem"

in the next page i am getting till "Hi all" 

Remaining text is missing, If I pass through get or post method using ajax.

给我答案。如何获取我放置在文本框中的所有内容以及“&”

您需要使用或函数对字符串进行URL编码。

是的,我遇到了相同的类型问题,并找到了我们需要将数据作为键值对传递的解决方案

我在Ajax中传递了如下数据:

数据:email=“+email+”&name=”+name

但在Ajax中传递数据的正确方法是:

数据:{ 电邮:电邮,, 姓名:姓名
}

如果我在下一页中使用escape,我会在“如何更改”[amp;uu”as“&”中看到“Hi all[amp;u解决我的问题”?