JSFiddle - React, Tailwind, and code Playground

by yakun chen

JavaScript

 
var xhr = new XMLHttpRequest();  xhr.open('GET', 'example.php');  xhr.send(); xhr.onreadystatechange = function () {    
    if (xhr.readyState == 4 && xhr.status == 200) {      alert(xhr.responseText);    
    } else {      alert(xhr.statusText);    
    }  
};