$.
get(
"url", {
name:
"John",
time:
"2pm" },
function(
data){
console.
log(
data);
});
$.
post(
"url", {
name:
"John",
time:
"2pm" },
function(
data){
console.
log(
data);
});
$.
ajax({
type:
"GET",
url:
"url/id/"+
Id,
dataType:
"json",
success
:
function(
data){
console.
log(
data);
}
});
$.
ajax({
type:
"POST",
url:
"url",
data:
"name=John&location=Boston",
dataType:
"json",
success
:
function(
data){
console.
log(
data);
}
});
后端直接用$_GET或$_POST接受就行