From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- .../index.html" | 107 --------------------- 1 file changed, 107 deletions(-) delete mode 100644 "files/zh-cn/web/api/selection/\344\273\216document\344\270\255\345\210\240\351\231\244/index.html" (limited to 'files/zh-cn/web/api/selection/从document中删除') diff --git "a/files/zh-cn/web/api/selection/\344\273\216document\344\270\255\345\210\240\351\231\244/index.html" "b/files/zh-cn/web/api/selection/\344\273\216document\344\270\255\345\210\240\351\231\244/index.html" deleted file mode 100644 index 5532bcf0fc..0000000000 --- "a/files/zh-cn/web/api/selection/\344\273\216document\344\270\255\345\210\240\351\231\244/index.html" +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Selection.deleteFromDocument() -slug: Web/API/Selection/从Document中删除 -translation_of: Web/API/Selection/deleteFromDocument ---- -
-
-
{{ ApiRef("DOM") }}{{SeeCompatTable}}
-
-
- -
-

The Selection.deleteFromDocument() method deletes the actual text being represented by a selection object from the document's DOM.

-
- -

Syntax

- -
sel.deleteFromDocument()
-
- -

Parameters

- -

None.

- -

Examples

- -

A user selects the (imaginary) text "ve two ea" from "Rabbits have two ears." on a web page. The user then clicks a button that executes the JavaScript snippet window.getSelection().deleteFromDocument(). The document's text becomes "Rabbits hars."

- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML Editing', '#dom-selection-deletefromdocument', 'Selection.deleteFromDocument()')}}{{Spec2('HTML Editing')}}Initial definition
{{SpecName('Selection API', '#widl-Selection-deleteFromDocument-void', 'Selection.deleteFromDocument()')}}{{Spec2('Selection API')}}Current
- -

Browser compatibility

- -
{{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}}
-
- -

See also

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