-
-
Save HenriqueMitsuo/32014d5519ed86f8a21ea626766bc613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const $ = function(Selector) { | |
return document.querySelector(Selector); | |
} | |
$.Json = function(Object){ | |
return JSON.parse(Object) | |
} | |
$.Ajax = function(type = "GET", link) { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange=function() { | |
if (this.readyState == 4 && this.status == 200) { | |
document.getElementById("demo").innerHTML = this.responseText; | |
} | |
}; | |
xhttp.open(type, link, true); | |
xhttp.send(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment