Javascript
// 发送 GET 请求
$.ajax({
type: "GET",
url: "test.php",
data: "name=Name&location=Location",
success: function(response){
console.log(response);
}
});
// 发送 POST 请求
$.ajax({
type: "POST",
url: "test.php",
data: "name=Name&location=Location",
success: function(response){
console.log(response);
}
});
```