Highlighting Text
Join the Discussion
Highlighting the content of a form field when the field is selected makes it easier for your visitor to completely replace the field content with their own simply by starting typing their new input. They can just as easily modify the existing highlighted content simply by pressing an arrow key before typing anything else.
Here is an example input field that shows how the highlighting works:
Creating this effect is so simple that we can easily include the entire code within the field definition in the HTML. It looks like this:
onfocus="this.select();" />

