From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../ja/archive/mozilla/xul/attribute/id/index.html | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 files/ja/archive/mozilla/xul/attribute/id/index.html (limited to 'files/ja/archive/mozilla/xul/attribute/id/index.html') diff --git a/files/ja/archive/mozilla/xul/attribute/id/index.html b/files/ja/archive/mozilla/xul/attribute/id/index.html deleted file mode 100644 index 9a74313f02..0000000000 --- a/files/ja/archive/mozilla/xul/attribute/id/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: id -slug: Archive/Mozilla/XUL/Attribute/id -tags: - - XUL Attributes - - XUL Reference -translation_of: Archive/Mozilla/XUL/Attribute/id ---- -
« XUL リファレンス HOME
-
id
型: window 内で固有の要素 ID
要素を識別するために付与される固有の識別子。 getElementById() などの DOM 関数やスタイルシートで要素を参照するために使うことができる。
-
-

-
<button id="foo" label="Click Me" oncommand="doSomething()"/>
-
-<script>
-function doSomething(){
-    var myButton = document.getElementById('foo');
-    myButton.setAttribute('label','The button was pressed');
-}
-</script>
-
-

上記の例のさらに抽象的な例は、以下のようになる。

-
<button id="foo" label="Click Me" oncommand="setWidgetLabel(this, 'I was pressed')"/>
-<script>
-function setWidgetLabel(idName, newCaption){
-   document.getElementById( idName.id ).setAttribute('label',newCaption)
-}
-
-</script>
-
-

参照

-

name

-
-
- -
-- cgit v1.2.3-54-g00ecf