$.ajax({
    type : "get",    //这里get和post都可以
    url : "cccccc.ccc",
    data: "name = xx & location = abc",
    success : function(){

    }
})

第二种:

$.ajax({
    type : "get",    //这里get和post都可以
    url : "cccccc.ccc",
    data: {
              name : "xx",
              location : "abc"
    }
    success : function(){

    }
})    

第三种:  变量法

var dataJS =  {
              "name": "xx",  //属性名打引号 类似json
              "location": "abc"
    }

$.ajax({
    type : "get",    //这里get和post都可以
    url : "cccccc.ccc",
    data: dataJS,
    success : function(){

    }
})    

 

 posted on 2016-07-08 10:25  zenghan  阅读(122)  评论(0编辑  收藏  举报