A Good Enough addEvent

Several years ago, PPK of Quirksmode sponsored a contest to come up with a new version of the trusty JavaScript addEvent function. The original addEvent was created by Scott Andrew LePera in 2001 as a way to merge Internet Explorer’s attachEvent with the W3C’s addEventListener. Both addEventListener and attachEvent allow you to attach [...]

JavaScript Email Hiding

If you plainly show an email address on a website, it’s likely to be harvested by a spam spider. To get around that problem, I’ve been using the following JavaScript in the middle of a page: <script type="text/javascript"> <!– This script hides the email address from spiders –>                 [...]