我正在使用自定义版本sweetalert向我的用户询问输入。身份证设法使一切正常,但有一个奇怪的行为;为了能够在该输入框中的文字,你必须先点击屏幕:在sweetAlert中输入文本
swal({
title: "Aggiornamento profilo",
text: '<br /><form method="post" id="taxcode-update" name="taxcodeUpdate"><input id="admin-tax-code" minlength="3" class="form-control wedding-input-text wizard-input-pad" type="text" name="taxCode" placeholder="Codice fiscale"></form>',
type: "warning",
showCancelButton: false,
confirmButtonText: "Aggiorna il mio profilo",
closeOnConfirm: false
}, function() {
swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
工作例如:https://jsfiddle.net/fvkppx06/
该解决方案将只在第一次调用模式,采取这种修改我做证明HTTPS来看一看: //jsfiddle.net/fvkppx06/2/有什么想法? – DomingoSL
我不知道,对不起!尽管[Sweet Alert]的最新版本(http://t4t5.github.io/sweetalert/)允许使用'type:input',这可能会更好? @DomingoSL – Albzi