Javascript to hide email addresses from crawlers (and spammers)
Here’s the one I use:
<SCRIPT TYPE=”text/javascript”>
<!–
// protected email script by Joe Maller
// JavaScripts available at http://www.joemaller.com
// this script is free to use and distribute
// but please credit me and/or link to my site
emailE=(’name@’ + ‘domain.com’)
document.write(’<A href=”mailto:’ + emailE + ‘”>’ + emailE + ‘</a>’)
//–>
</script>
Instructions for use:
If you’ve already set up a mailto: link, you should have something that looks like this in your HTML code:
<a href=”mailto:name@domain.com”>name@domain.com</a>
Simply replace that entire tag with the script above, and then change the variables in “emailE.” It won’t show up in Dreamweaver, but when you test it out on the server, the email address will be there… for human eyes only…
RELATED / YOU MIGHT FIND THESE INTERESTING
- BROWSE / IN TIMELINE
- « The XO free laptop program (one laptop per child)
- » How to display html or javascript code in a Wordpress entry
- BROWSE / IN Design Computers
- « The XO free laptop program (one laptop per child)
- » How to display html or javascript code in a Wordpress entry
Like this story? Share with others on:
del.icio.us
digg
reddit
furl
Stumble it!
COMMENTS / 2 COMMENTS
Jack added these pithy words on Aug 16 08 at 8:30 amHi,
I am using
http://www.mobilefish.com/services/hideemail/hideemail.php to protect my email address against spam bots.
This site also contains other useful tools.
Synergy Informatics added these pithy words on Oct 07 08 at 5:37 amHi,
Thanks for this, its easy to use yet effective to work.
SPEAK / ADD YOUR COMMENT
Comments are moderated.
Technorati Tags: email addresses mailto hide spam spammers crawlers hide email address javascript address



