These Javascript codes allow you to to highlight text for copy and pasting at the click of a button or when the cursor is moved over something. This is especially useful for people posting HTML, Javascript and other types of code to thier site. All you have to do is choose the example you like, copy the code and then paste it to your webpage. Since this code is Javascript, it will not work in e-mail signatures. These examples have been designed to work with both WebTV/MSNTV and PC Browsers.

Of course, there are many more ways to highlight text (or technically speaking, implement the Javascript select() function). The following examples are only a sample of the ways you can use this, be creative and you could modify these codes to add some interesting and practical features to your site.


Example 1
Hit the button to highlight the code below.


Example 2
Hit the button to highlight the code and move the focus to the box.


Example 3
Move the cursor over the textarea to highlight the code.


Example 4
Move the cursor over the textarea to highlight the code and move the focus to the box.


Example 5
Hit the button to highlight the words in the text box.




Example 6
Hit the button to highlight the words and move the focus to the text box.




Example 7
Move the cursor over the text box to highlight the words.



Example 8
Move the cursor over the text box to highlight the words and move the focus to the box.

by NESGamepro - nescgi.com