<script>
document.getElementById('card_data').focus();
$('.x-body').on('keydown', 'input[type=text],select,textarea', function(e) {
if (e.keyCode == 13) {
focusable = $('#form1').find('input[type=text],select,textarea').filter(':visible');
next = focusable.eq(focusable.index(this)+1);
if (next.length) {
next.focus();
} else {
tosubmit();
document.getElementById('card_data').focus();
}
}
});
</script>
HTML鼠标焦点默认停留在某个input框
最新推荐文章于 2023-07-12 11:03:45 发布