w3svhools ajax code example
Example: $.ajax javascript
$.ajax({
url: 'https://example.com/your-page',
success:function(data){
//'data' is the value returned.
},
error:function(){
alert('An error was encountered.');
}
});