Email masking with Javascript

Really simple code for hiding your email address:

<a href="mailto:mike-at-pixor.net" onclick="this.href=this.href.replace(/-at-/,'@')"> email me </a>

Probably lots of other, better ways around but this is easy enough to remember without needing to search every time.

Pretty sweet that I didn’t post all of 2008 and now I’ve posted two days in a row huh?

One Response to “Email masking with Javascript”

  1. huphtur says:

    ARGH! Make it stop! Too many poststeresrstsrtssssss

Leave a Reply

You must be logged in to post a comment.