[英]jquery POST data append not happening
I want to append some string before data output. 我想在数据输出之前附加一些字符串。 Please help me figure out in how to do it.
请帮助我弄清楚如何做。 I have tried both HTML and append function, but I am not getting desired output.
我已经尝试了HTML和append函数,但是没有得到想要的输出。
Like if data = abc
, it should show data = xyzabc
and append xyz
automatically to JSON data 就像
data = abc
,它应该显示data = xyzabc
并将xyz
自动附加到JSON数据
data = $(this).serialize() + "&" + $.param(data);
$.ajax({
type: "POST",
url: "a.php",
data: data,
success: function(data) {
$(".the-return").html(
data
);
just add the string "xyz" to the output data as "xyz" +data 只需将字符串“ xyz”作为“ xyz” + data添加到输出数据
try 尝试
$(".the-return").html( "xyz" + data );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.