I need to operate some operation on selected text in html
Suppose I have:
<div id="ch"> HI How are you </div>
Suppose user selects HI in UI. How can I catch HI? Any suggestions?
I need to operate some operation on selected text in html
Suppose I have:
<div id="ch"> HI How are you </div>
Suppose user selects HI in UI. How can I catch HI? Any suggestions?
You can add a ‘span’ tag with an is of “whatever” around the “HI”. Then you can add a click event to the span tag and do whatever you want!
I think, you will have to use js for that. Which will be launched on click. In that js script you can find the value of LI which was chosen and do whatever you want.
Or I don't get your question :)