Hi,
I was just wondering if there is a way to return the highlighted text in a text box or a text area.
For instance:
<textarea id="foo"> The quick brown fox jumped ... </textarea>
<input type=text id="foo" value="The quick brown fox jumped ... ">
Lets say I highlight the text 'brown fox' in one of those fields, is there a way for me to get that text and say, for instance, copy to clipboard without using the mouse menu etc..
I get the copy to the clipboard part and tried document.getSel ection() in mozilla
doesnt, and it doesnt seem to work for form fields. I'd be very thankful to anyone who has a solution to this.
Thanks in advance.
I was just wondering if there is a way to return the highlighted text in a text box or a text area.
For instance:
<textarea id="foo"> The quick brown fox jumped ... </textarea>
<input type=text id="foo" value="The quick brown fox jumped ... ">
Lets say I highlight the text 'brown fox' in one of those fields, is there a way for me to get that text and say, for instance, copy to clipboard without using the mouse menu etc..
I get the copy to the clipboard part and tried document.getSel ection() in mozilla
doesnt, and it doesnt seem to work for form fields. I'd be very thankful to anyone who has a solution to this.
Thanks in advance.
Comment