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

后端 未结 6 1632
旧巷少年郎
旧巷少年郎 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:50

    To dynamically load a CSS file using JQuery.

    var link = $("");
    link.attr({
        type: 'text/css',
        rel: 'stylesheet',
        href: 
    });
    $("head").append( link ); 
    

提交回复
热议问题