Sunday, October 25, 2009

Anti-spam protected mailto links



I used this javascript encoder to create a secure mailto link on my website. The only problem with the script is that it cannot show the email address as text, so I replaced the text "email us" with the image tag. Now visitors can both see my email address, and click on it to compose a message in their email client.

I didn't have to escape any characters in the script to put in the image tag.

Before:


After:

No comments:

Post a Comment

Only comments in English will be considered. Thank you!