【发布时间】:2020-06-11 01:43:56
【问题描述】:
在 chrome 版本更新后,通过按 enter 键在 html 的日期字段中不起作用我的 google chrome 版本现在是 83.0.4103.61,当我按 Enter 时,它会显示日期选择器而不是移动到其他字段
$(document).on('keypress','#from_date',function(e){
//alert("in");
e.preventDefault();
if(e.which == 13){
$('#to_date').focus();
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="date" class="form-control customInp" name="from_date" value="2020-05-20" id="from_date">
<input type="date" class="form-control customInp" name="to_date" value="" id="to_date">
【问题讨论】:
-
我尝试在第一个字段中按 Enter 键,然后移至下一个字段。版本:81.0.4044.138
-
它在我之前的 chrome 更新之前的版本中工作,但在更新版本中不工作
标签: html jquery google-chrome