Basic idea is that you put a link on the page before most of the other links and if it gets a hit you block the IP (or whatever seems sensible) for a period of time. Naturally you give human visitors a way out.
Here's an example:
http://www.sqlite.org/cvstrac/wiki
Starting with the javascript submit might not be a bad start. It's probably the quickest way to stop the dumb spiders.
-r