| d2r diego's weblog |
How to hide email addresses with javascriptWhile most of us want to add mailto: links in our webpages, we'd also like to minimize the ability of crawlers to find it, particularly for spam.To use it, simply type your email address in the form and the message you'd like to see on your links. All the calculations are local to your machine, using JavaScript, so you're not sending your address to be processed anywhere. After pressing the "Show Me the Code" button a section of the page will be made visible, including the code you need to use on your webpage. Enjoy!
Code to copy & paste into your page
At the beginning of the page:
And when you want to output your email link:
Copyright © Diego Doval 2002-2005.
|
