aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/tech/xul/attribute/selected/index.html
blob: 47971cd8c82033a3e7036c28721edb270084fd09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
title: selected
slug: Mozilla/Tech/XUL/Attribute/selected
tags:
  - XUL Attributes
translation_of: Archive/Mozilla/XUL/Attribute/selected
---
<div class="noinclude">
 <span class="breadcrumbs xulRefAttr_breadcrumbs">« <a href="/zh-CN/docs/XUL_Reference">XUL Reference home</a></span></div>
<dl>
 <dt>
  <code id="a-selected"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/selected">selected</a></code></dt>
 <dd>
  Type:
  <i>
   boolean</i>
 </dd>
 <dd>
  Indicates whether the element is selected or not. This value is read-only. To change the selection, set either the <code><span><a href="https://developer.mozilla.org/zh-CN/docs/XUL/Property/selectedIndex">selectedIndex</a></span></code> or <code><span><a href="https://developer.mozilla.org/zh-CN/docs/XUL/Property/selectedItem">selectedItem</a></span></code> property of the containing element.</dd>
</dl>
<div class="noinclude">
 <h3 id="See_also" name="See_also">See also</h3>
 <ul>
  <li><a href="cn/XUL/Attribute/prefpane.selected">prefpane.selected</a></li>
  <li><a href="cn/XUL/Attribute/tab.selected">tab.selected</a></li>
 </ul>
</div>
<p></p>