How to Hide Email Address from bots but display it

I suck at JavaScript. :lol: This is probably really simple. Please take pity on me an help?

I’m trying to display my email address and have it linked (with mailto:) on a website. However, I don’t want to just do that with HTML b/c of spam bots. Isn’t there a JavaScript way to do this?

Thanks,
~TehYoyo

There’s a ton of stuff on this online. Sounds like you didn’t do any googling first. :stuck_out_tongue:

Try this:

http://www.websitecodetutorials.com/code/javascript/graceful-degradation-mailto-email-address-obfuscation-tutorial.php

Hey! I did a little bit of Googling…

Thanks for the help. I’ll try the first method.

Hi,

I would recommend the SpamSpan technique (at paranoia level 3).
It has the major advantage of leaving easy-to-read text when JavaScript is disabled.

Example:

<span class="spamspan">
<span class="u">user</span>
[at]
<span class="d">example [dot] com</span>
</span>

Result (JavaScript enabled)

user@example.com

Result (JavaScript disabled)

user [at] example [dot] com

See also:
http://stackoverflow.com/questions/4098408/is-it-worth-obfuscating-email-addresses-on-the-web-these-days