aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/selection/collapsetoend
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/selection/collapsetoend
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/selection/collapsetoend')
-rw-r--r--files/zh-cn/web/api/selection/collapsetoend/index.html97
1 files changed, 97 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/selection/collapsetoend/index.html b/files/zh-cn/web/api/selection/collapsetoend/index.html
new file mode 100644
index 0000000000..a0c08c8da9
--- /dev/null
+++ b/files/zh-cn/web/api/selection/collapsetoend/index.html
@@ -0,0 +1,97 @@
+---
+title: Selection.collapseToEnd()
+slug: Web/API/Selection/collapseToEnd
+translation_of: Web/API/Selection/collapseToEnd
+---
+<div>{{ ApiRef("DOM") }}{{SeeCompatTable}}</div>
+
+<p><strong><code>Selection.collapseToEnd()</code></strong> 方法的作用是取消当前选区,并把光标定位在原选区的最末尾处,如果此时光标所处的位置是可编辑的,且它获得了焦点,则光标会在原地闪烁。</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="syntaxbox"><em>sel</em>.collapseToEnd()
+</pre>
+
+<h3 id="Parameters" name="Parameters">参数</h3>
+
+<p>无</p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML Editing', '#dom-selection-collapsetoend', 'Selection.collapseToEnd()')}}</td>
+ <td>{{Spec2('HTML Editing')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Selection API', '#widl-Selection-collapseToEnd-void', 'Selection.collapseToEnd()')}}</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>