IE6 jQuery append () function and JS appendChild (elem) function causes of error

The reason being given problem in IE6 tangled for a long time finally found append () 

jQuery's append () function with the JS appendChild (elem) These two functions must be loaded in the DOM can otherwise you will recall error

Or may be replaced by insertBefore appendChild

var f_style = document.createElement('link');

f_style.type = 'text/css';

f_style.rel = 'stylesheet';

f_style.href = 'http://xxx.com/xxx.css';

var headObj = document.getElementsByTagName('head')[0];

headObj.insertBefore(f_style, headObj.firstChild);

Reproduced in: https: //www.cnblogs.com/caly/archive/2011/12/14/2287831.html

Guess you like

Origin blog.csdn.net/weixin_34072637/article/details/93538064