blob: 75c4957f0e91c3eb33ead4c4a02a07bf6be572f0 (
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
29
30
|
---
title: command
slug: Mozilla/Tech/XUL/Attribute/command
tags:
- XUL Attributes
translation_of: Archive/Mozilla/XUL/Attribute/command
---
<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-command"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/command">command</a></code></dt>
<dd>
Type:
<i>
element id</i>
</dd>
<dd>
Set to the <code id="a-id"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code> of a <code><a href="/zh-CN/docs/Mozilla/Tech/XUL/command" title="command">command</a></code> element that is being observed by the element.</dd>
</dl>
<div class="noinclude">
<h3 id="Example" name="Example">Example</h3>
<pre><command id="cmd_openhelp" oncommand="alert('Help');"/>
<button label="Help" command="cmd_openhelp"/>
<button label="More Help" command="cmd_openhelp"/>
</pre>
<h3 id="See_also" name="See_also">See also</h3>
<p><code><code><a href="/zh-CN/docs/Mozilla/Tech/XUL/command" title="command">command</a></code></code> element, <code><code id="a-oncommand"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/oncommand">oncommand</a></code></code> and <code><code><a href="/zh-CN/docs/Mozilla/Tech/XUL/commandset" title="commandset">commandset</a></code></code></p>
</div>
<p></p>
|