$.ajax javascript

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

Also in JavaScript: