daily pastebin goal
56%
SHARE
TWEET

tes

a guest Mar 26th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ajax = new XMLHttpRequest();
  2.  
  3. ajax.onreadystatechange = function () {
  4.  
  5.     if (ajax.readyState == 4 && ajax.status == 200) {
  6.  
  7.         var myData = JSON.parse(ajax.responseText);
  8.  
  9.         console.log(myData);
  10.  
  11.         alert("Sukses");
  12.  
  13.     } else {
  14.  
  15.         alert("gagal");
  16.  
  17.     }
  18. };
  19.  
  20. ajax.open("GET", "http://localhost/curl/data.php", true);
  21. ajax.send();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top