From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/selection/anchornode/index.html | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 files/zh-cn/web/api/selection/anchornode/index.html (limited to 'files/zh-cn/web/api/selection/anchornode') diff --git a/files/zh-cn/web/api/selection/anchornode/index.html b/files/zh-cn/web/api/selection/anchornode/index.html new file mode 100644 index 0000000000..6fd53e9b1b --- /dev/null +++ b/files/zh-cn/web/api/selection/anchornode/index.html @@ -0,0 +1,98 @@ +--- +title: Selection.anchorNode +slug: Web/API/Selection/anchorNode +translation_of: Web/API/Selection/anchorNode +--- +
{{ApiRef}}
+ +

概述

+ +

Selection.anchorNode 只读属性返回选区开始位置所属的节点({{domxref("Node")}})。

+ +

用法

+ +
sel.anchorNode
+ +

注意

+ +

用户可能从左至右进行框选(沿着文字顺序)或者从右至左框选(沿着文字顺序的反方向)。锚点位于用户开始选择的位置。可以通过按住Shift和方向键来得知锚点所在的位置。选区的锚点是不会移动的,但是选区的焦点、选区其他的结束位置(多个选区,译者注)可以移动。

+ +

说明

+ + + + + + + + + + + + + + + + + + + +
说明状态注释
{{SpecName('HTML Editing', '#dom-selection-anchornode', 'Selection.anchorNode')}}{{Spec2('HTML Editing')}}Initial definition
{{SpecName('Selection API', '##widl-Selection-anchorNode', 'Selection.anchorNode')}}{{Spec2('Selection API')}}Current
+ +

浏览器兼容性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatUnknown}}{{CompatVersionUnknown()}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)Firefox OSIE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown()}}1.0{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

相关链接

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