JSFiddle - React, Tailwind, and code Playground
HTML
<div id="retorno">Here we go!</div>
<button id="bt_load-the-page">Load the page!</button>
JavaScript
$("#bt_load-the-page").on("click",function(){
$.ajax({
type: 'GET',
url: "http://anytime.ueuo.com/http-return.php",
crossDomain: true,
success: function (data, textStatus, jqXHR) {
alert("Ok!");
$("#retorno").html(data);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Wait, take a look: " + textStatus + ", " + errorThrown);
},
complete: function (jqXHR, textStatus ) {
alert("Status: " + textStatus);
}
});
});