【发布时间】:2015-11-01 22:50:14
【问题描述】:
Enter 键无法在 Mozilla 中打开下拉菜单。 在 Chrome 中运行良好。(它的 chrome 默认行为)
尝试这样的东西在 Mozilla 中实现它
var self = this;
$('select').on('keyup', function (e) {
if (e.keyCode == 13) { $(this).trigger('click'); }
});
【问题讨论】:
-
试试
e.which而不是e.keyCode,但我觉得效果很好here -
@GuruprasadRao 不,它没有
标签: javascript jquery html css typescript