Skip to content

Instantly share code, notes, and snippets.

@yangshun
Last active January 22, 2019 02:27
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yangshun/382f8fcf921e40031e30 to your computer and use it in GitHub Desktop.
var script = document.createElement('script');
script.src = '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js';
script.onload = function () {
// Do something
}
document.getElementsByTagName('head')[0].appendChild(script);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment