如何使用 jQuery AJAX 请求同时发送 GET 和 POST 参数?
我正在尝试添加 do=ajax&id=" + ID
到url
,但结果请求仅打磨到sss.php
没有查询字符串(获取部分)。谢谢。
$.ajax({
url: "sss.php?do=ajax&id=" + ID ,
type: "post",
data: "ddd=sss",
// callback handler that will be called on success
success: function(response, textStatus, jqXHR){
// log a message to the console
console.log("Hooray, it worked!");
},
// callback handler that will be called on error
error: function(jqXHR, textStatus, errorThrown){
// log the error to the console
console.log(
"The following error occured: "+
textStatus, errorThrown
);
}
});