=

Daschmi's Notizblog

RSS Feed

Javascript Asynchron laden

Erstellt in Sonstiges am 19. Februar 2015

Funktion um Javascript Dateien asynchron nachzuladen:

function loadJs(jsURL)
{

  var scriptTag = document.createElement(’script‘);
  scriptTag.src = jsURL;
  scriptTag.type = ‚text/javascript‘;
  scriptTag.async = true;
  var headTag = document.getElementsByTagName(‚head‘)[0];
  headTag.appendChild(scriptTag);

}


Bitte genehmigen Sie die Verwendung von Cookies dieser Website! Mehr Informationen

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close