Is it possible to use javascript in order when rolling over or (clicking) a word in a web page to get that word (e.g in variable). I would like to make a firefox extension with that feature.
javascript rollover to get text
98 views Asked by unicorn At
2
Ofcourse there is nothing such as clicking a word , as it is not an object , eventhough you can highlight a word , and yes you can get its value check this :
https://developer.mozilla.org/en-US/docs/Web/API/Window.getSelection