Created
November 21, 2011 18:58
-
-
Save gcpantazis/1383556 to your computer and use it in GitHub Desktop.
Embedding a script into the DOM
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
c = document.createElement('script'); | |
c.type = 'text/javascript'; | |
c.src = 'URL TO SCRIPT'; | |
(document.getElementsByTagName('head')[0] || document.getElemntsByTagName('body')[0]).appendChild(c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment