If the email address is: email@example.com, most websites use:
That line of basic HTML is easily harvested by spambots. Within a few weeks, the spam will start trickling in. After a few months, there will be a flood of annoying spam emails.
var name = "joe";
var domain = "mydomain.com";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
document.write(name + '@' + domain + '</a>');