Selection: anchorOffset 屬性
Selection.anchorOffset 只讀屬性返回當選區的錨點位於 Text、CDATASection 或 Comment 型別的 Selection.anchorNode 中時,錨點在該節點內的字元偏移量。
當 Selection.anchorNode 是其他型別的節點時,Selection.anchorOffset 返回錨點在該 Selection.anchorNode 中的 Node.childNodes 偏移量。
這個數字是從零開始計數的。如果選區從 Selection.anchorNode 的第一個字元開始,則返回 0。