Possible Duplicate:
Serializing to JSON in jQuery
Tôi muốn gửi một mảng như một yêu cầu Ajax:
info[0] = 'hi';
info[1] = 'hello';
$.ajax({
type: "POST",
url: "index.php",
success: function(msg){
$('.answer').html(msg);
}
});
Làm thế nào tôi có thể làm điều này?
tại đây: http://stackoverflow.com/questions/713884/convert-js-array-to-json-object-for-use-with-jquery-ajax – Z4k4r14
loại: 'POST', url: '/ url/action /', dữ liệu: {param1: 1, id: "text"}, dataType: 'text', – Paul