JavaScript Highlight or Select data a textbox

Dear Experts.

I am using ASP.NET2.0, C#.
I want to make Highlight  or Select data in side a textbox through JavaScript.
Who is Participating?
muzzy2003Connect With a Mentor Commented:
See the following PAQ for JavaScript to achieve this:
Bob LearnedCommented:
Define "Highlight":  change color?  change selection?

RamyBouchraAuthor Commented:
thank you for your reply
but i want it to be like if i pres TAB so it will be selected so i can write over it with out deleting the exsiting value.

thank you.
Bob LearnedCommented:
You must have missed this:

   textbox.setSelectionRange(0, textbox.value.length);

Call it with the onFocus event.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.