有人知道如何使用jquery通过键盘从第一选择标记到下一个选择标记打开和移动焦点吗?
我尝试了这个示例,但是它对我没有用。
<script type="text/javascript">
$(document).ready(function(){
$('input').keydown(function(e) {
if(e.which == 16) {
$(this).closest("div").prev('div').find('select').focus();
}
if(e.which == 13) {
$(this).closest("div").next('div').find('select').focus();
}
});
});
</script>
预先感谢。