Firefox not able to enumerate document.styleSheets[].cssRules[]

后端 未结 7 1790
-上瘾入骨i
-上瘾入骨i 2020-12-16 15:33

Here is the code:

  • http://jsfiddle.net/salman/2hyYg/
  • http://jsfiddle.net/salman/2hyYg/show/

You\'ll notice the alert(document.styl

7条回答
  •  无人及你
    2020-12-16 16:33

    Try window.document.styleSheets[x].cssRules.length instead of document.styleSheets[x].cssRules.length. It will work on firefox without any security exception.

提交回复
热议问题