Possible Duplicate:
Serializing to JSON in jQuery
I want to send an array as an Ajax request:
info[0] = 'hi';
info[1] = 'hello';
$.ajax({
type: "POST",
url: "index.php",
success: function(msg){
$('.answer').html(msg);
}
});
How can I do this?
转载于:https://stackoverflow.com/questions/8890524/pass-array-to-ajax-request-in-ajax