コメント変数レコードに + 記号がある場合、レコードは送信されません。jqueryでクエリ文字列をエンコードする方法はありますか? いくつかの方法を試しましたが、うまくいきませんでした
$.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');
}
});