aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/node/lastchild
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/node/lastchild')
-rw-r--r--files/ja/web/api/node/lastchild/index.md55
1 files changed, 33 insertions, 22 deletions
diff --git a/files/ja/web/api/node/lastchild/index.md b/files/ja/web/api/node/lastchild/index.md
index e7f5626f3c..9e9d386274 100644
--- a/files/ja/web/api/node/lastchild/index.md
+++ b/files/ja/web/api/node/lastchild/index.md
@@ -2,27 +2,38 @@
title: Node.lastChild
slug: Web/API/Node/lastChild
tags:
- - DOM
- - Gecko
- - Gecko DOM Reference
- - Node
+ - プロパティ
+ - リファレンス
+ - 読み取り専用
+browser-compat: api.Node.lastChild
translation_of: Web/API/Node/lastChild
---
-<div>
- {{ApiRef}}</div>
-<h2 id="Summary" name="Summary">概要</h2>
-<p><strong>lastChild</strong> はノードの子要素の内、最後のものを返します。</p>
-<h2 id="Syntax_and_Values" name="Syntax_and_Values">構文</h2>
-<pre class="syntaxbox">var last_child = element.lastChild
-</pre>
-<h2 id="Description" name="Description">説明</h2>
-<p><code>lastChild</code> として返されるのはノードです。その親が要素であるならば、子ノードは一般的に Element ノード、Text ノード、Comment ノード となります。子要素を持たない場合は <code>null</code> が返されます。</p>
-<h2 id="Example" name="Example">例</h2>
-<pre class="brush:js">var tr = document.getElementById("row1"); // table 要素の特定の行を取得
-var corner_td = tr.lastChild; // 特定の行の内、最後のセルを取得
-</pre>
-<h2 id="Specification" name="Specification">仕様書</h2>
-<ul>
- <li>{{Spec("http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-61AD09FB", "DOM Level 2: lastChild", "REC")}}</li>
- <li>{{Spec("http://dom.spec.whatwg.org/#dom-node-lastchild", "DOM Standard: lastChild")}}</li>
-</ul>
+{{APIRef("DOM")}}
+
+**`lastChild`** は {{domxref("Node")}} インターフェイスの読み取り専用プロパティで、このノードの最後の子ノードを返します。
+親ノードが要素であった場合、子ノードはふつう、要素ノード、テキストノード、コメントノードの何れかです。
+子要素がない場合は `null` を返します。
+
+## Value
+
+このノードの最後の子である {{domxref("Node")}}、または子ノードがなければ `null` です。
+
+## 例
+
+```js
+const tr = document.getElementById("row1");
+const corner_td = tr.lastChild;
+```
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- {{domxref("Node.firstChild")}}
+- {{domxref("Element.lastElementChild")}}