Element.appendChild() chokes in IE

前端 未结 4 1713
予麋鹿
予麋鹿 2020-12-03 19:36

I have the following javascript:

  css = document.createElement(\'style\');
  css.setAttribute(\'type\', \'text/css\');
  css_data = document.createTextNode(         


        
4条回答
  •  暖寄归人
    2020-12-03 20:17

    This is particular with the "style" element, IE doesn't allow the appendChild() method on it.

提交回复
热议问题