0
我在JS(阿賈克斯)代碼,但我想讓它沒有Ajax(XMLHttpRequest的)
$.ajax({
type:'POST',
data:'slug='+prize,
url:'/wybrana-nagroda/',
success:function(msg)
{
$('#whaiting').hide();
if(msg==='winner')
$(window.location).attr('href','/formularz');
}
});
它應該看起來如何?
function send(post, url) {
var client = new XMLHttpRequest();
client.open("POST", url);
client.send(message);
}
?
謝謝。
https://developer.mozilla.org/en -US /文檔/ DOM/XMLHttpRequest的 – j08691
http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery –
爲什麼?也許更多關於你想要做什麼的見解可以幫助他人提供更完整的答案。 –