Probably the simplest way is to make sure the <form> element has a name="form_name" attribute (use whatever value you prefer for "form_name", throughout).
JS:
function disable()
{
document.form_name.button_name.disabled=true;
/* repeat above line for each "button_name" to be disabled
}
HTML:
<form name="form_name" action="something.php" onsubmit="disable();">