HTML5 – 如何设置setCustomValidity?
如何解决输入字段以设置setCustomValidity? 这是行不通的:
小提琴
$('#numberinput').val("").setCustomValidity('The two email addresses must match.');
使用jQuery
您可以执行以下操作:
$('#numberinput').get(0).setCustomValidity('The two email addresses must match.');
并不是:
$('#numberinput').val("").setCustomValidity('The two email addresses must match.');