The harvesters used are smart but not perfect. What they do is crawl through the web looking for text on pages that look like an email address: characters like "blahblahblah @ something . com". Whenever they detect a dot and an at symbol in the same text, they assume it to be an email address. So typing out your email address in plain HTML is not a very good idea because one of these bots will quickly store your email address in a database and often send out spam to you.
Step 1: Using a Program to Confuse a Program (the Part for Geeks)
Harvesters are just programs written in a way to capture your email address on a webpage. We can write a very simple program to confuse them.
We must create a string of characters that will represent the letters and symbols in our email address. We could also use one for email addresses that incorporate numbers and other symbols, but for simplicity of this tutorial I will only be showing you one for very basic email addresses that have only letters:
var chars="@abcdefghijklmnopqrstuvwxyz."; // for very simple email addresses that contain only letters
Next we create a variable that will hold our actual email address that we want to output to the webpage:
var email = "peter"+chars+"schlamp"+chars+"gmail"+chars+"com";
alert(email); // outputs my email address in an alert box
The next step will show all the code together and a way to output it on your page.
Step 2: Putting It All Together
// chars = @
// chars = .
// chars = a ... chars = b ... chars = c ... chars = z ... get it?
// EDIT BELOW
// example: firstname.lastname@example.org
var email = "hel"+chars+chars+nums+nums+nums+chars+"gmail"+chars+"com";
// EDIT ABOVE
// place your email address in the email div
document.getElementById("email").innerHTML = email;