How can I find selected word from a html document?
-
When user double clicked on any text on my webpage, A popup window shows that text (word) in big font. So, Can I determine which word is selected in a webpage? Please help me with examples/links. I like to use javascript, html, php. simple example is ok. Thanks in advance.
-
Answer:
At any time, you can do: <script type="text/javascript"> var selText = document.getSelection().toString(); </script> selText will then contain the selection text at that time.
AdamT at Yahoo! Answers Visit the source
Related Q & A:
- How can I find and replace html links with Notepad++?Best solution by stackoverflow.com
- How can I find the radius of a circle?Best solution by Yahoo! Answers
- How can I find out who owns a particular Yahoo email address?Best solution by Yahoo! Answers
- How can I find out who owns a particular email address?Best solution by Yahoo! Answers
- How can I find out more about a Yahoo member?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.