Possible Duplicate:
How to highlight a part part of an Input text field in HTML using Javascript or JQuery
Does anyone know how to highlight some text in input[type=text] or textarea?
Is it possible?
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 have to place a
divbehind yourtextareaand then style it according to it’s text.Notes:
textareabackground-colorto transparent to see yourhighlightercolor.highlighterhave to be the same style and text content of yourtextareato put thespanon the right place.highlightertext to the same color of it’s background or you’ll see a<b>effect, the same for thespan.html:
css:
demo