I want my script to select just a part of the text inside a text field (<input type="text"). How can I do this?
I want my script to select just a part of the text inside a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will need to use Range, and cross-browser compatibility will probably be an issue.
Quirksmode: Creating a Range object from a Selection object
If jQuery is an option, here is a function you can use (reference)…