To set the dialog default button, make that button get focus when dialog is opened:
$('#dd').dialog({
buttons:[{
id:'btnOk',
text:'Ok',
iconCls:'icon-ok',
handler:function(){
alert('ok');
}
},{
text:'Cancel',
handler:function(){
$('#dd').dialog('close');
}
}],
onOpen:function(){
$('#btnOk').focus();
}
});