Created
September 28, 2010 15:17
-
-
Save maplpro/601176 to your computer and use it in GitHub Desktop.
How to insert JavaScript into documents
This file contains hidden or 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
el = document.createElement( "script" ) | |
el.src = "http://code.jquery.com/jquery-1.4.2.min.js" | |
document.body.insertBefore(el) |
This file contains hidden or 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 loadScript() { | |
var callback = 'parseResponse'; | |
var script = document.createElement('script'); | |
script.src = 'http://imagine-it.org/google/jshacks/getjson.php?callback=' + callback; | |
document.body.appendChild(script); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://pamelafox-samplecode.googlecode.com/svn/trunk/tokyotalk/slideshow.html#slide15
http://pamelafox-samplecode.googlecode.com/svn/trunk/tokyotalk/jsonp2.html