JS CSS file is acquired inside the tag and attribute values


// styleSheets [0] represents the first HTML page to add a link to CSS

// Get content
var cssfile = document.styleSheets [0] .cssRules ;
tag name // first label
cssfile [0] .selectorText
 

// contents of the first tag
cssfile [0] .cssText

 

Guess you like

Origin www.cnblogs.com/cjw111/p/11579143.html