How to load up CSS files using Javascript?

后端 未结 19 3969
栀梦
栀梦 2020-11-21 07:51

Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done?

P.S the javascript will be hosted on my site, but I want users

19条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-21 08:02

    There is a general jquery plugin that loads css and JS files synch and asych on demand. It also keeps track off what is already been loaded :) see: http://code.google.com/p/rloader/

提交回复
热议问题