[Home]
>
DOM
>
Get the selected text
Get the selected text
JavaScript version
const
getSelectedText
=
(
)
=>
window
.
getSelection
(
)
.
toString
(
)
;
Get all siblings of an element
Get the position of an element relative to the document