Click in an editable div box to get the location of the cursor

if you want to find an idea, input can get the cursor position through the selectionEnd attribute, but div does not have this attribute. I don"t know if there are any other attributes that can replace

.
Apr.03,2021

add a contenteditable to div belongs to


Mouse events have pageX and pageY attributes

Menu