Created
April 7, 2015 01:21
-
-
Save kedarmhaswade/b67f638829984eb1b952 to your computer and use it in GitHub Desktop.
demo of jsonp with github api
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function foo(response) { | |
var meta = response.meta; | |
var data = response.data; | |
console.log(meta); | |
console.log(data); | |
} | |
//var script = document.createElement('script'); | |
//script.src = 'https://api.github.com?callback=foo'; | |
//document.getElementsByTagName('head')[0].appendChild(script); | |
</script> | |
<script src="https://api.github.com?callback=foo"> | |
</script> | |
</head> | |
<body> | |
<p>More ... Open up your browser's console.</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment