Created
November 15, 2012 04:03
-
-
Save grej/4076576 to your computer and use it in GitHub Desktop.
Load external js onto page
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 (document, undefined){ | |
promptLoc = prompt('library location', "http://www.somewhere.org/lib.js"); | |
var script = document.createElement("script"); | |
// any script | |
script.src = promptLoc; | |
document.body.appendChild(script); | |
}(document)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment