Hide your email address + mailto link with javascript from spammer

Submitted by Anonymous (not verified) on Wed, 10/14/2009 - 10:06

Of course you can write you email on an gif or jpeg image. But you cant give a mailto:link without your email appears clearly. Therefore use javascript, your email appears to visitors as a text but appears spam-bots crawlers as javascript code, which they ignore as usual.

<script language="javascript">
var email = ['i','n','f','o','@', 's', 'i', 't', 'e', '.', 'c', 'o', 'm'];
var link = "";
for(i=0; i<email.length; i++){
str2 += email[i];
}
document.write('<'+'a'+' hr'+'ef="mai'+'lto:'+link+'">'+link+'</a>');
</script>

Add new comment