How to load in an external CSS file dynamically?

后端 未结 8 1677
滥情空心
滥情空心 2020-12-14 22:32

I\'m trying to create a dynamic page using external .css pages where the page color will get changed. Below is my code. But when I click the href, I am not gett

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 22:39

    ' document.createElement("link") ' creates hyper link object, not css style tag() element, so you are not able to apply this dynamically

    correct me if i am wrong

提交回复
热议问题