javascript - Embed js file in another -


how embed following inside js file

    <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> 

you can not embed javascript file in another. can load more javascript files in dynamically function such one.

function loadjs(file) {     // grab head element     var head = document.getelementsbytagname('head')[0];      // create script element     var script = document.createelement('script');      // set type     script.type = 'text/javascript';      // set source file     script.src = file;      // add script element head     head.appendchild(script); } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -