< Back

Document Subject: Hide email address from spam bots
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#SpamPrevent or http://A555F9/nn.nsf/ByAlias/SpamPrevent

Are you receiving alot of unsolicited Spam or junk mail? One way around this is to disguise your email address in web pages to prevent spam 'bots (robots) from harvesting your email address.




Use this code: (make it pass thru html)

 

<SCRIPT TYPE="text/javascript">
<!--
// by Adam Foster to use Character entities to help even more
// See http://www.notesninjas.com/#SpamPrevent
emailE=('adam' +'&#64;' + 'mail'+'&#46;' + 'com')
document.write('Email me here: <A href="mailto:' + emailE + '">' + emailE + '</a>')
//-->
</script>
<NOSCRIPT>
   <em>Email address protected by JavaScript.<BR>
   Please enable JavaScript to contact me.</em>
</NOSCRIPT>

 

The &#64; is equivalent to @.

The &#46; is equivalent to a dot.

-Adam