info = [];
info[0] = 'hi';
info[1] = 'hello';
$.ajax({
type: "POST",
data: {info:info},
url: "index.php",
success: function(msg){
$('.answer').html(msg);
}
});
More Related Contents:
- AJAX Post of JavaScript String Array to JsonResult as List Always Returns Null?
- How to parse JSON data with jQuery / JavaScript?
- Jquery Ajax Posting JSON to webservice
- How can I use JQuery to post JSON data?
- json Uncaught SyntaxError: Unexpected token :
- Send JSON data via POST (ajax) and receive json response from Controller (MVC)
- TypeError: $.ajax(…) is not a function?
- How do I format a Microsoft JSON date?
- jQuery loop over JSON result from AJAX Success?
- jQuery won’t parse my JSON from AJAX query
- CORS header ‘Access-Control-Allow-Origin’ missing
- jQuery posting valid json in request body
- JSONP request error handling
- How to access JSON Object name/value?
- How to send request parameter array to servlet using jQuery $.ajax?
- jQuery parse JSON multidimensional array
- When using Ajax with jQuery DataTables, how do I determine what to do with the data returned?
- Check if username exists in database with AJAX
- What does autocomplete request/server response look like?
- How do I PUT data to Rails using JQuery
- Post Nested Object to Spring MVC controller using JSON
- How to return a JSON object in standard web forms .Net
- GUI-based or Web-based JSON editor that works like property explorer [closed]
- console.log(result) prints [object Object]. How do I get result.name? [duplicate]
- Rails not decoding JSON from jQuery correctly (array becoming a hash with integer keys)
- Populate Select box options on click with Javascript/Jquery with Json data
- Accessing web Service from jQuery – cross domain
- jQuery – How to PUT JSON via Ajax?
- JSON parsing error syntax error unexpected end of input
- My Own Like Button: Django + Ajax — How?