1
如果我在+注释符号中没有提交变量记录。有没有什么办法可以在jQuery中编码查询字符串?我尝试了一些方法,但他们没有工作+在ajax查询字符串中
$.ajax({
type: 'post',
url: rootURL + 'services/service.php?method=insertcomment',
data: 'comment=' + comment+'&storyid='+storyid,
dataType: 'json',
success: function (data) {
if(data.code == 200)
$('#success-message')..show();
else
alert('failure');
}
});
我同意,数据应该作为一个对象传递。 – 2012-07-08 06:10:38