get document.styleSheets by name instead of index?

后端 未结 5 1672
鱼传尺愫
鱼传尺愫 2020-12-25 11:20

document.styleSheets is used with an index,
but what If I want to use stylesheet.insertRule with a specific CSS file ?

I know the file\'s name, which is

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-25 11:39

    This happened because of the address of CSS is different of the adress of the page. To fix is just make the both have the some adress.

提交回复
热议问题