我对 jquery 模态对话框有疑问。我将重点放在文本框(经典 javascript)上,重新加载页面时它工作正常。但我试图找出模式对话框关闭后如何设置焦点。有人可以给我答案吗?
html
<div>
<form action='core/php/_scr_commission_equipment_direct_add.php?token=$token' method='post' name='equipmentIDN_form'>
IDN <input type='text' class='idn_reader_text_color' name='equipmentIDN_direct' autocomplete='off' />
</form>
</div>
<script type='text/javascript'>
document.equipmentIDN_form.equipmentIDN_direct.focus()
</script>
jQuery
$('#dialog-graph2').dialog({
autoOpen: true,
width: 1000,
modal:false,
position:['middle',50],
resizable:false,
});
$('#dialog_graph2').click(function(){
$('#dialog-graph2').dialog('close');
return false;
})