Spam blocking with JavaScript and CSS

I got inspired by kari patila’s post where he uses CSS class to hide spam text using CSS and I wrote something my own by using JavaScript and content to write email address.

.email:after {
content: “@jpkeisala.com”;
}

<a class=”email” xhref=”http://www.jpkeisala.com/v6/#” mce_href=”http://www.jpkeisala.com/v6/#” onclick=”window.location = ‘mailto:’+this.innerHTML+’@jpkeisala.com'”>jp</a>

a bit ugly but i think it works.