Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

OnSelect function on textbox
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

OnSelect function on textbox

OnSelect function on textbox 9 months, 3 weeks ago #754

  • hrishi
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
<textarea rows="3" cols="15">
Sample text,Sample text,Sample text,Sample text,Sample text,Sample text
</textarea>

now my question is how can I add the onselect function.I want the user to be able to select once on the text to copy and paste, not have to select the text manually.

Re: OnSelect function on textbox 9 months, 2 weeks ago #757

  • shama
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 0
<textarea rows="2" cols="20" on-click="this.focus();this.select()">

Although this will work too:

Code:

<textarea rows="2" cols="20" on-click="this.select()">
  • Page:
  • 1
Time to create page: 1.21 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download