Last active
November 3, 2020 08:19
-
-
Save ledangtuanbk/f24e192e81737ce53c31c4d580df9f55 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
(function() { | |
var script = document.createElement('script') | |
script.setAttribute("type", "text/javascript") | |
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js") | |
document.getElementsByTagName("head")[0].appendChild(script) | |
})(); | |
// call method send request | |
function send(url) | |
{ | |
console.log("test function"); | |
console.log("ajax request to the resource which will require cors enabled"); | |
$.ajax | |
({ | |
dataType: "html", | |
url: url, | |
success: function(data) | |
{ | |
console.log("log response on success"); | |
console.log(data); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment