HTML5 editing API Range object 1:
The Range object represents a contiguous area on the page:
Selection objects and Range objects
<! Doctype html>
The starting point of the Selectionnode,range object is specified as the starting point of a node, and the end point of the Range object is specified as the end point of the node, and the Range object contains that node;
Selectionnodecontents, the start point of the Range object is specified as the starting point for all content in a node, and the end point of the Range object is specified as the end point for all content in that node;
DeleteContents method: Delete The content contained by the Range object
<! Doctype html>
Setstart, specifying the start point of the Range object
SetEnd, ... End.
and other methods:
<! Doctype html>
Other methods:
<! Doctype html>
This article is from the "Thystar" blog, make sure to keep this source http://4440271.blog.51cto.com/4430271/1684074
HTML5 study notes (7)