Created
December 5, 2018 07:22
-
-
Save jp26jp/a1d4f815e928a35f87067b7f5f201714 to your computer and use it in GitHub Desktop.
Add a javascript file to the body of the html document
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 addScript(url) { | |
const tag = document.createElement("script") | |
tag.type = "text/javascript" | |
tag.src = url | |
document.body.appendChild(tag) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment