[Vanila JS] 동적으로 javascript 를 javascript 로 읽어들이기: load script inside script
Post
원문 보기 →[Vanila JS] 동적으로 javascript 를 javascript 로 읽어들이기: load script inside script
(function(document, tag) { var scriptTag = document.createElement(tag), // create a script tag firstScriptTag = document.getElementsByTagName(tag)[0]; // find the first script tag in the document // set the source of the script to your script scriptTag.src = "MY_SCRIPT_FILE_OR_URL"; firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); // append the script to


