We use this code for simulating Tab key with Enter key:
function EnterTab() {
if (event.keyCode == 13) event.keyCode = 9;
retur
This worked in IE9 but no longer works in IE11.So you have to find a solution that stimulates the result you want.For example, if you want to allow users to press 'Enter'
to go to the next data entry field (like tab does), try something like this.
var i = 0;
var els = myform.getElementsByTagName('input').length
document.onkeydown = function(e) {
e = e || window.event;
if (e.keyCode == 13) {
i++;
i > els - 1 ? i = 0 : i = i;
document.myform[i].focus();
}
};
Press 'enter' inside text to act like tab button
jQuery Example:
$('.info').bind('keypress', function(event) {
if (event.which === 13) {
var nextItem = $(this).next('.info');
if (nextItem.size() === 0) {
nextItem = $('.info').eq(0);
}
nextItem.focus();
}
});