I doubt this is
exactly what you're looking for, but:
Code:
$("form").submit(function() {
location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+')+ '.html';
return false;
});
This will tie this function to execute on a submit for the form, ala onSubmit.