(送信ボタンではなく)通常のボタンをクリックすることでトリガーされるajaxベースの送信プロセスを使用してみてください。jQueryを使用すると非常に簡単です。
私の知る限り、スパムボットにはjavascriptがありません。
JavaScriptが有効になっていないユーザーが心配な場合は、フォームを送信できなくてもまったく問題ないと思います。彼らがあなたのサイトでjavascriptを有効にすることを信頼できない場合、彼らがWebサイトを最大限に使用できないのはあなたのせいではありません。
編集:
参照:実用的な非画像ベースのCAPTCHAアプローチ?
ただし、問題は、誰かが意図的にサイトをターゲットにしている場合、この種の手法は機能しません。
EDIT2:
実際の例へのリンクを提供することはできませんが、もう少し詳細をブログに書いたので、ここにいくつかのサンプルコードを示します。
function submit_form()
{
jQuery.ajax({
"type": "POST", // or GET
"url": 'action_url', // The url you wish to send the data to, the url you'd put in the "action" attribute on the form tag
"data": jQuery("form#the-form").serialize(), // The data you'll send. You need to get the form somehow. Easiest way is to give it an id.
"dataType": "json", // Only put this if the server sends the response in json format
"success": function(data, textStatus) // server responded with http status 200
{
// This is the happy case: server response has arrived
},
"error": function(req, textStatus, errorThrown) // maybe HTTP 404 or HTTP 500
{
// something went wrong, the response didn't go through or the response didn't come. Handle the situation: let the user know, or something.
},
"complete": function(req, textStatus) // This one always gets called anyway
{
// cleanup after yourself
} // XXX careful: if you put a comma here, IE6 will fail
});
}