How does JavaScript get the offset of a selection?

The

scene appears in a rich text editor. I want to select a piece of text, and then a tooltips appears above the selected text

.

it is not clear which method should be used to get the start and end points of a selection (selection) relative to the offset of the body (not the character offset) to locate the tooltips element.

Mar.24,2021

  

$(selector). Offset ()

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36e16-2b7c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36e16-2b7c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?