Is there a simple way of tracking when an ad is clicked on just using JavaScript?

I'm guessing using a form with the ad image as the submit button sending an email to me. Is this the best way?

The code must be able to redirect the user to the advertiser's website even if JavaScript is not switched on.

We do not use PHP/MySQL or any other RDMS for this particular site - just plain old HTML.