Add a Confirm Dialog to a Command Button

<apex:commandButton reRender="frm" value="Remove" action="{!remove}" onclick="if(!confirm('Do you want to remove?')){return false};" title="Remove"/>