aboutsummaryrefslogtreecommitdiff
path: root/files/pl/mozilla/tech/xul/atrybut/label/index.html
blob: 62c4398e4281915a56ae8aec1645c25c28e8d6ff (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
31
32
---
title: label
slug: Mozilla/Tech/XUL/Atrybut/label
tags:
  - Atrybuty_XUL
  - Dokumentacja_XUL
translation_of: Archive/Mozilla/XUL/Attribute/label
---
<div class="noinclude"><span class="breadcrumbs xulRefAttr_breadcrumbs">« <a href="/pl/docs/Dokumentacja_XUL">Dokumentacja XUL</a></span></div>
<dl><dt> <code id="a-label"><a href="https://developer.mozilla.org/pl/docs/Mozilla/Tech/XUL/Atrybut/label">label</a></code>
</dt><dd> Typ: <i>string</i>
</dd><dd> Etykieta, która zostanie wyświetlona na elemencie. Jeśli zostanie on usunięty, to żaden tekst nie zostanie wyświetlony. </dd></dl>
<div class="noinclude">
<h3 id="Zobacz_tak.C5.BCe" name="Zobacz_tak.C5.BCe"> Zobacz także </h3>
<ul><li> <a href="pl/XUL/Atrybut/treeitem.label">treeitem.label</a>, element <code><a href="pl/XUL/label">&lt;label&gt;</a></code>
</li></ul>
<h4 id="Przyk.C5.82ady_w_JavaScript" name="Przyk.C5.82ady_w_JavaScript">Przykłady w JavaScript</h4>
<pre>&lt;label value="Whaw" id="the-big-label" command="the-big-button"/&gt;
&lt;button id="the-big-button" label="Click me"
	oncommand="alert(document.getElementById('the-big-label').value)"/&gt;

&lt;label id="myLabel" value="My label"/&gt;
&lt;button label="Click me"
	oncommand="document.getElementById('myLabel').setAttribute('value','Value changed');" /&gt;

&lt;checkbox label="my Checkbox" id="myCheckboX"/&gt;
&lt;button label="Another click"
	oncommand="document.getElementById('myCheckboX').setAttribute('label','Still not checked');"/&gt;
&lt;button label="Show label of checkbox"
	oncommand="alert( document.getElementById('myCheckboX').getAttribute('label') )"/&gt;
</pre>
</div>