ajax data post call in javascript
$.ajax({
url: 'ajaxfile.php',
type: 'post',
data: {name:'yogesh',salary: 35000,email: '[email protected]'},
success: function(response){
}
});
ajax data post call in javascript
$.ajax({
url: 'ajaxfile.php',
type: 'post',
data: {name:'yogesh',salary: 35000,email: '[email protected]'},
success: function(response){
}
});
ajax get js
let xhr = new XMLHttpRequest();
xhr.open("GET", "une/url");
xhr.responseType = "json";
xhr.send();
xhr.onload = function(){
if (xhr.status != 200){
alert("Erreur " + xhr.status + " : " + xhr.statusText);
}else{
alert(xhr.response.length + " octets téléchargés\n" + JSON.stringify(xhr.response));
}
};
xhr.onerror = function(){
alert("La requête a échoué");
};
xhr.onprogress = function(event){
if (event.lengthComputable){
alert(event.loaded + " octets reçus sur un total de " + event.total);
}
};
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us