Aynı anda jquery ajax isteği ile GET ve POST parametrelerini nasıl gönderilir?Jquery, ajax isteğinde aynı anda GET ve POST parametrelerinin gönderilmesi
do=ajax&id=" + ID
'u 'a eklemeye çalışıyorum, ancak sonuç isteği sorgu dizesi olmadan yalnızca sss.php
'a zımparalanmış olarak (parçaya git). Teşekkürler.
$.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
);
}
});
'$ .post' yerine' $ .ajax' yerine – defuz
@defuz kullanmayı deneyin: He/o *, 'post' kullanarak tüm amaç ve amaçlar için kullanılır. ['post'] (http://api.jquery.com/jQuery.post/),' 'post '' istekleri için bir kolaylık sağlayan bir wrap. –
Benim için çözümün çalışıyor. Senin için de çalışmalı. Sunucuya hangi isteklerin gönderildiğini görmek için Chrome Ağ Konsolunuza gidin ve kontrol edin. –