I create a script utility function for my project.it works well in chrome, firefox, IE10, IE9, but it throws an "Unknown runtime error" in IE8
util.addScript = function appendStyle(scriptcontetnt) {
var st = document.createElement('script');
st.type = "text/javascript";
st.innerHTML = scriptcontetnt;
document.getElementsByTagName('head')[0].appendChild(st);
return true;
};
I know using innerhtml throw errror in ie8, so I read the different streams related to this, but didn't get the right solution for this problem
user2426842
source
share