引进于 HTML 4
概述
返回最后一个启用的样式表集合,当document.selectedStyleSheetSet
属性发生变化时,该属性的值就会变化.
语法
lastStyleSheetSet = document.lastStyleSheetSet
On return, lastStyleSheetSet
indicates the style sheet set that was most recently set. If the current style sheet set has not been changed by setting document.selectedStyleSheetSet
, the returned value is null
.
注意: 当调用
document.enableStyleSheetsForSet()
方法之后,该属性的值也不会发生变化.例子
var lastSheetSet = document.lastStyleSheetSet; if (!lastSheetSet) { lastSheetSet = "Sheet not yet changed"; } console.log("The last sheet set is: " + lastSheetSet);
相关链接
document.preferredStyleSheetSet
document.selectedStyleSheetSet
document.styleSheetSets
document.enableStyleSheetsForSet()