Gaijin.at -
Tip: Protect yourself from spam and phishing with Phalanx, a powerfull spam filter for POP3 accounts.

JavaScript: Hide e-mail addresses from spam robots

This JavaScript hides e-mail addresses on your website from spam robots.

Spammer searches websites automatically with robots for e-mail addresses. To make it a little bit harder that spammer gets your e-mail address, you can misrepresent an e-mail address. In the Usenet e-mail addresses are printed often in the form:

n-a-m-e@domain.com
(please remove all hyphens)

or
name [at] domain [dot] com

The following JavaScript coins multiple parts of an e-mail address, so the browser and an user doesn't see a difference. But in the source of the HTML file can't the address not be found.

Example

or

Compatible and tested with

Microsoft Internet Explorer 5.0 or higher
Mozilla Gecko 1.1a or higher
Opera 5.11 or higher
Netscape Navigator 4.7 or higher
Konqueror 3.0 or higher

License

Open Source (GNU GPL)

Sourcecode

JavaScript function

If you want to protect your e-mail address in multiple pages, you can use a exteranl JavaScript file with this funtion:

HTML sourcecode:

Beta Area | Search | Webmasters | Support | Contact
Copyright © 2003-2010 Gaijin.at