Right, great solution until people start using it. Then it will be trivial to add this feature to spam bots. I bet some already figured it out. It's not that hard to integrate a Javascript VM.
I was going to ask, "What about those without JavaScript or that have it disabled?" but who cares about them. 99% of the world has JavaScript probably!
Doesn't this defeat the main purpose, though? At least on that page, the fall-back was just in the mail[aht]whatever format, which I suspect spammers have learned to decipher long ago.
I wondered that too. But apparently not, because we've got the proof: our spam has gone way down. Though if it goes up again I'll bot-proof that fall-back page a bit more.
function em(e2, e1) { return 'mailto:' + e1 + '@' + e2 + '.com'; }
... and somewhere in your HTML code:
onClick="this.href=em('foobar', 'contact')"
The name of the function may be more cryptic and I just thought it may be even dynamic (random), as well as the order of arguments.