Adding css rules with text method to style element does not work in IE

后端 未结 6 1637
旧巷少年郎
旧巷少年郎 2020-12-05 14:08

It works fine in Firefox and Chrome, but does not work in IE8. Here is the html structure:



 
  

        
6条回答
  •  广开言路
    2020-12-05 14:39

    I was having the same problem with a dependency plug-in for jQuery, just use this code:

    $('head').append('');
    

    then your code will work in almost all browsers, here "content" is a variable you define externally and it will contain the data you want to insert into