Select text with javascript

Select some text and press the button.

Script:

The script I made, thanks to Peter-Paul Koch for his demo-page. Copy and modify it :).