$.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(){ } })