appendChild() is a more native way:
var script = document.createElement('script');
script.type="text/javascript";
script.src="https://stackoverflow.com/questions/5282228/script.js";
document.head.appendChild(script);
appendChild() is a more native way:
var script = document.createElement('script');
script.type="text/javascript";
script.src="https://stackoverflow.com/questions/5282228/script.js";
document.head.appendChild(script);