AbstractRange:endOffset 属性
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2021年4月.
AbstractRange 接口的 endOffset 属性返回范围结束位置的结束节点中的偏移量。
值
一个整型。它表示在 Node(由 endContainer 指定)中,范围最后一个字符所在的位置。
示例
js
let endOffset = range.endOffset;
规范
| Specification |
|---|
| DOM> # ref-for-dom-range-endoffset①> |
浏览器兼容性
Loading…