我似乎无法自动将焦点设置在 Bootbox 的文本字段上。
这是我的代码:函数 setCode(myCode){
bootbox.confirm("Enter your PIN: <input id='pin_code' type='password' name='pin_code'></input>",
function(result) {
if(result)
console.log($("#pin_code").val());
});
$("#pin_code").focus();
};
也许有关 bootbox 的代码的某些东西妨碍了?