From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/node/lastchild/index.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 files/zh-cn/web/api/node/lastchild/index.html (limited to 'files/zh-cn/web/api/node/lastchild/index.html') 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 +--- +

{{APIRef()}}

+

概述

+

Node.lastChild 是一个只读属性,返回当前节点的最后一个子节点。如果父节点为一个元素节点,则子节点通常为一个元素节点,或一个文本节点,或一个注释节点。如果没有子节点,则返回 null

+

语法

+
var last_child = element.lastChild
+

示例

+
var tr = document.getElementById("row1");
+var corner_td = tr.lastChild;
+
+

规范

+ -- cgit v1.2.3-54-g00ecf