This is my e-mail: val @propercode.com.
It looks and feels as a classic e-mail address. You can click on it to verify. At the same time, it is well protected from the email sniffers.
Below is the HTML code and simple java script that make this job done.
<script type="text/javascript">
function email(anchor)
{
anchor.href='mailto:'+anchor.innerHTML.toString().replace(/<([a-zA-Z0-9]*)\b[^>]*>|<\/([a-zA-Z0-9]*)\b[^>]*>| |\n/g,'');
}
</script>
<a onclick="email(this);" href="#"><span>v</span><span>a</span><span>l</span><span style="float:right"> </span><span>@propercode</span><span>.com</span></a>
I use the harmless <span> tags to split my email into pieces.
<span>v</span><span>a</span> ... <span>.com</span>
I also inserted a space character followed by @propercode to add some noise to the HTML code. The statement style=”float:right” makes it “invisible” to the human eyes.
<span style="float:right"> </span>
The Java script function email(anchor) a) removes the HTML tags and spaces from the specified anchor tag, b) concatenates ‘mailto:’ to the clean email address, and c) adds the resulted string to the anchor attribute href when one clicks on the link.
You can use this approach to turn your.email [at] propercode [dot] com into the good looking email addresses.
Please feel free to use the posted code.
Val Besshaposhnikov