Javascript get selected text from any textinput/textarea on the page

Viewed 20677

How can get the selected text from a textbox/textarea if I don't know which one active (focused). I am trying to create a small bookmarklet that will correct the selected text in any type of input on a page.

1 Answers
Related