eMailing Selected HTML Text

This JavaScript is an easy way to copy and email selected html text that is on a web page. You can set this up as a Favorites item in Internet Explorer to make it simply to be able to do the emailing! Just highlight text on a page and then click the favorites link. The hightlighted input text will be placed in an email from your default mail program, ready for you to add a name and send!




Over 2000+ free Javascript
at JavaScriptBank.com Website
Sampled by JavaScriptBank.com
There is a trick I learned that is very useful. It creates an easy way to mail selected text on a Web page to yourself (or someone else). You can set this up as a Favorites item in Internet Explorer to make it simply to be able to do the emailing!

All you need to do is add a Favorites item. You can give it a name such as "Copy Text". In the URL field for the favorites, put the following line of code:

Javascript:selectedText = document.selection.createRange().text;
selectedText = escape(selectedText);
void(location.href='mailto:?BODY='+selectedText);


This is all one line of code with no line breaks.

Now when you select this Favorites link, your email client will be opened and whatever text is highlighted in the browser will be placed into the body of the email!