Built From Developers For Developers
» Kuikie.com » Snippets » JavaScript » Other » Hide E-Mail from Spiders
  Categories
  JavaScript
    Ajax
    IFrame
    Integers
    Other
    Strings
 

Hide E-Mail from Spiders

This little snippet allows you to hide your e-mail from mail harvesting spider bots. It hides the email and displays it using JavaScript. Optionally, it allows if JavaScript is disabled to show an image with the e-mail.

<script>
    var user = "mymail";var host = "myhost.com";var link = user + "@" + host;
    document.write("<a hre" + "f=ma" + "ilto:" + user + "@" + host + ">" + link + "</a>");
</script>
<noscript>
    <img src="mymail.png" alt="" />
</noscript>
 
©2012 Sinevia Ltd Terms of Use         Privacy Policy Valid XHTML 1.0 Transitional