AJAX 上傳資料

AJAX 上傳資料

var  formData = "name=ravi&age=31";  //Name value Pair
//    or
//var formData = {name:"ravi",age:"31"}; //Array 
 
$.ajax({
    url : "AJAX_POST_URL",
    type: "POST",
    data : formData,
    success:function(data, textStatus, jqXHR) 
    {
     var myArray = JSON.parse(data);
        alert(myArray["Result"]=="OK");
    },
    error: function(jqXHR, textStatus, errorThrown) 
    {
 
    }
});
Jquery
CH01 找物件CH02 設定取得值CH10 AJAXCH101 INPUT-Autocomplete