JavaScript - Anti-Spam Email Link
JavaScript - Anti-Spam Email Link
Submitted by Corey Goldberg on Fri, 31/08/2007 - 16:54.Posting a link to your email address on your website is inviting spiders to grab it and spam you. I get around this by using a JavaScript snippet so my email address link renders on the client but not in the actual HTML source.
While I'm sure there are much better ways to do this, this has been successful for me so far.
This script creates a "mailto" link for my email address:
<script type="text/javascript"> <!-- var name = "corey" var emailHost
= "goldb.org" document.write("<a href=" + "mail" + "to:" + name + "@" + emailHost
+ ">" + name + "@" + emailHost + "</a>") //--> </script> 