Mugshot

Hey I'm Lee. My blog was put up to house useful nuggets I could refer back to, document my learning curves on new technologies and house tutorials I write for Umbraco and other .NET stuff.

All thoughts and comments on here are my own, and in no way reflect my employer - I also take no responsibility for spelling, grammar or terminology, so read at your own risk!

Blogs I Read

Sites I Like

Hiding Your Email Address From Spambots

Putting your email address on your website in this day and age is just asking for copious amounts of spam sent to your inbox.

A very easy way round this is display your email address on the page using JavaScript; because as yet those nasty spammer bots having figured out how to crawl JavaScript...

Here's the very simple bit of JavaScript to create your email

<script type="text/javascript">
/* Just change a and b to your email address without the @ */
a="lee";
b="leemessenger.co.uk";
document.write('<a href=\"mailto:'+a+'@'+b+'\">');
document.write(a+'@'+b+'<\/a>');
</script>

Simply copy and paste the code into your page where you want the email address to appear and change the name and domain to whatever your email address is without the @ symbol.

Back to top