There are many methods to quickly obscure an email address from spam harvesters, this approach relies on the fact that most email harvesters won't understand JavaScript.
A quick example:
Would result in:
As you can see, the output no longer remotely resembles an email address and is very unlikely to get picked up by a spam harvester.