DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Javasrcritpt Email To Avoid Spam

09.26.2006
| 8973 views |
  • submit to reddit
        // email is written with javascript to hide it aganst scanning.
// if javascript is off, the email is obfuscated
<script type="text/javascript" language=javascript>
<!--
name=('hugo');
at=('@');
domain=('mueller');
dot=('.');
ext=('de');
document.write('<a href="mailto:' + name + at + domain + dot + ext + '">' + name + at + domain + dot + ext + '<\/a>');
//-->
</script>
<noscript>hugo (at) mueller (dot) de</noscript>