Este artigo descreve o método de carregar dinamicamente os arquivos JS. Compartilhe -o para sua referência, como segue:
Função loadScript (url) {var hd = document.getElementsByTagName ('head') [0], js = document.createElement ('script'); js.src = url; js.type = "text/javasccript"; if (js.adDeventListener) {JS.adDeventListListR (JavScript "; if (js.adDeventLener) (js.adDeventListlist"; false);} else if (js.attachevent) {js.attachevent ("oNreadyStatechange", function () {if (js.readyState === "carregado" || js.readystate === "complete") {alert ('carregado';For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of Javascript Algoritmos e Técnicas de Traversal "e" Resumo do Uso do Javascript Mathematic Operations "
Espero que este artigo seja útil para a programação JavaScript de todos.