<button type="submit" onclick="submitButtonClick(event)">Submit</button>
<script>
function submitButtonClick(event) {
event.preventDefault();
//other stuff you want to do instead...
}
</script>
<form name="foo" onsubmit="return false">
event.preventDefault();