Range.startContainer

 

 

Range.startContainer 是只读属性,返回 Range 开始的节点。要更改节点的起始位置,请使用 Range.setStart() 方法。

 

Syntax

startRangeNode = range.startContainer;

Example

range = document.createRange();
range.setStart(startNode,startOffset);
range.setEnd(endNode,endOffset);
startRangeNode = range.startContainer;

Specifications

Specification Status Comment
DOM
Range.endContainer
Living Standard No change.
Document Object Model (DOM) Level 2 Traversal and Range Specification
Range.startContainer
Obsolete Initial specification.

Browser compatibility

BCD tables only load in the browser

See also