Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. Document
  4. Document.lastStyleSheetSet

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

Document.lastStyleSheetSet

已弃用: 不再推荐使用该特性。虽然一些浏览器仍然支持它,但也许已从相关的 web 标准中移除,也许正准备移除或出于兼容性而保留。请尽量不要使用该特性,并更新现有的代码;参见本页面底部的兼容性表格以指导你作出决定。请注意,该特性随时可能无法正常工作。

Document.lastStyleSheetSet 返回最后一个启用的样式表集合。当document.selectedStyleSheetSet 属性发生变化时,这个属性的值就会随之发生变化。

返回时,lastStyleSheetSet 指示最近设置的样式表。如果当前样式表集尚未通过设置更改document.selectedStyleSheetSet, 则返回值为null

备注:document.enableStyleSheetsForSet() 被执行时,该值不会该变。

示例

js
let lastSheetSet = document.lastStyleSheetSet;if (!lastSheetSet) {  lastSheetSet = "Style sheet not yet changed";} else {  console.log("The last style sheet set is: " + lastSheetSet);}

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp