JSFiddle - React, Tailwind, and code Playground
by Amandeep Singh
HTML
<div id="id01"></div>
JavaScript
var xmlhttp = new XMLHttpRequest();
var url = "http://testinki.info/apidata/";
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
myFunction(xmlhttp.responseText);
}
}
xmlhttp.open("GET", url, true);
xmlhttp.send();
function myFunction(response) {
alert(response);
// var arr = JSON.parse(response);
// var i;
// var out = "<table>";
// for(i = 0; i < arr.length; i++) {
// out += "<tr><td>" +
// arr[i].apikey +
// "</td>
// }
// out += "</table>"
// document.getElementById("id01").innerHTML = out;
}