aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/selectedstylesheetset/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/document/selectedstylesheetset/index.html')
-rw-r--r--files/zh-cn/web/api/document/selectedstylesheetset/index.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/selectedstylesheetset/index.html b/files/zh-cn/web/api/document/selectedstylesheetset/index.html
new file mode 100644
index 0000000000..719af9c643
--- /dev/null
+++ b/files/zh-cn/web/api/document/selectedstylesheetset/index.html
@@ -0,0 +1,46 @@
+---
+title: Document.selectedStyleSheetSet
+slug: Web/API/Document/selectedStyleSheetSet
+translation_of: Web/API/Document/selectedStyleSheetSet
+---
+<p>{{ APIRef("DOM") }}{{ gecko_minversion_header("1.9") }}</p>
+
+<p>表示当前使用的样式表集合的名称</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="eval"><em>currentStyleSheetSet</em> = document.selectedStyleSheetSet
+
+document.selectedStyleSheet = <em>newStyleSheetSet</em>
+
+</pre>
+
+<p>返回时,currentStyleSheetSet表示当前使用的样式表集合的名称。 你也可以使用这个属性设置当前样式表集。</p>
+
+<p>设置这个属性的值相当于用<code>currentStyleSheetSet的值</code>调用 {{ domxref("document.enableStyleSheetsForSet()") }},然后将<code>lastStyleSheetSet</code> 的值设置为该值。</p>
+
+<div class="note"><strong>注意:</strong> 这个属性的值是实时的,直接更改样式表中的<code>disabled</code>属性将会影响这个属性的值.</div>
+
+<h2 id="Example" name="Example">示例</h2>
+
+<pre class="brush: js">console.log("Current style sheet set: " + document.selectedStyleSheetSet);
+
+document.selectedStyleSheetSet = "Some other style sheet";
+</pre>
+
+<div class="note"><strong>注意:</strong> 这个例子会帮助你理解设置<code>selectedStyleSheetSet</code> 的值和调用{{ domxref("document.enableStyleSheetsForSet()") }}之间行为的差异.</div>
+
+<h2 id="See_also" name="See_also">参看</h2>
+
+<ul>
+ <li>{{ domxref("document.lastStyleSheetSet") }}</li>
+ <li>{{ domxref("document.preferredStyleSheetSet") }}</li>
+ <li>{{ domxref("document.styleSheetSets") }}</li>
+ <li>{{ domxref("document.enableStyleSheetsForSet()") }}</li>
+</ul>
+
+<h2 id="Specification" name="Specification">规范</h2>
+
+<ul>
+ <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#alternate-style-sheets" title="http://www.whatwg.org/specs/web-apps/current-work/#alternate-style-sheets">HTML5: Alternate Style Sheets</a></li>
+</ul>