Tab 键跳转到隐藏窗体



块的距离不同,我的脚本通过transform:translate切换它们。但是当你通过选项卡按钮浏览字段时,他会将它们切换到相同的不正确。单击选项卡移动到隐藏的div时如何防止它? 显示:无。不要提供。:)Example on jsfiddle:https://jsfiddle.net/6c3xsj8q/5/

你可以通过javascript来做到这一点,

禁用第一个表单提交按钮上的 Tab 键按下

喜欢这个

$('#first button[type=submit]').keydown(function(objEvent) {
if (objEvent.keyCode == 9) {  //tab pressed
objEvent.preventDefault(); // stops its action
}
})

最新更新