This questionThis question have many relevant info.
Generally speaking most browser compatible would be the use of apex:actionStatus . Something like this.
<apex:actionStatus id="saveStatus">
<apex:facet name="stop">
<apex:commandButton value="Save" action="{!save}" status="saveStatus" rerender="saveParentBlock" />
</apex:facet>
<apex:facet name="start">
<apex:commandButton value="Saving..." disabled="true" status="saveStatus"/>
</apex:facet>
</apex:actionStatus>
But i personally prefer the use of javascript. This way.
function disableBtns(){
$j('.btn').prop({className:'btnDisabled',disabled:'disabled'});
}
function enableBtns(){
$j('.btnDisabled').removeProp('disabled');
$j('.btnDisabled').prop('className','btn');
}
<apex:actionFunction name="saveAndNew" action="{!saveAndNew}"/>
<input type="button" class="btn" value="{!$Label.SaveAndNew}" onclick="disableBtns();saveAndNew();" />