aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/node/lastchild
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/node/lastchild')
-rw-r--r--files/zh-cn/web/api/node/lastchild/index.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/node/lastchild/index.html b/files/zh-cn/web/api/node/lastchild/index.html
new file mode 100644
index 0000000000..72e9d6b1c5
--- /dev/null
+++ b/files/zh-cn/web/api/node/lastchild/index.html
@@ -0,0 +1,21 @@
+---
+title: Node.lastChild
+slug: Web/API/Node/lastChild
+tags:
+ - Property
+translation_of: Web/API/Node/lastChild
+---
+<p>{{APIRef()}}</p>
+<h2 id="Summary" name="Summary">概述</h2>
+<p><code><strong>Node.lastChild</strong></code> 是一个只读属性,返回当前节点的最后一个子节点。如果父节点为一个元素节点,则子节点通常为一个元素节点,或一个文本节点,或一个注释节点。如果没有子节点,则返回 <code>null</code>。</p>
+<h2 id="语法">语法</h2>
+<pre class="syntaxbox">var last_child = element.lastChild</pre>
+<h2 id="Example" name="Example">示例</h2>
+<pre class="brush: js">var tr = document.getElementById("row1");
+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>