diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/selection/anchornode | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/selection/anchornode')
-rw-r--r-- | files/zh-cn/web/api/selection/anchornode/index.html | 98 |
1 files changed, 98 insertions, 0 deletions
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 +--- +<div>{{ApiRef}}</div> + +<h2 id="Summary" name="Summary">概述</h2> + +<p><strong><code>Selection.anchorNode </code></strong><code>只读属性</code>返回选区开始位置所属的节点({{domxref("Node")}})。</p> + +<h2 id="Syntax" name="Syntax">用法</h2> + +<pre class="syntaxbox"><em>sel</em>.anchorNode</pre> + +<h2 id="Notes" name="Notes">注意</h2> + +<p>用户可能从左至右进行框选(沿着文字顺序)或者从右至左框选(沿着文字顺序的反方向)。锚点位于用户开始选择的位置。可以通过按住Shift和方向键来得知锚点所在的位置。选区的锚点是不会移动的,但是选区的焦点、选区其他的结束位置(多个选区,译者注)可以移动。</p> + +<h2 id="说明">说明</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">说明</th> + <th scope="col">状态</th> + <th scope="col">注释</th> + </tr> + <tr> + <td>{{SpecName('HTML Editing', '#dom-selection-anchornode', 'Selection.anchorNode')}}</td> + <td>{{Spec2('HTML Editing')}}</td> + <td>Initial definition</td> + </tr> + <tr> + <td>{{SpecName('Selection API', '##widl-Selection-anchorNode', 'Selection.anchorNode')}}</td> + <td>{{Spec2('Selection API')}}</td> + <td>Current</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari (WebKit)</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>Firefox OS</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>1.0</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_also" name="See_also">相关链接</h2> + +<ul> + <li>{{domxref("Selection")}}, 此属性所属接口。</li> +</ul> |