我尝试在不提交表单的情况下将输入键转换为选项卡,但只需按 Enter 即可删除提交表单...
风景:
<tr>
<td><input type="text" id="tipoContacto1" name="tipoContacto1" class="form-control input-sm" onkeypress="removerEnter(event)"/></td>
<td><input type="text" id="nomeContacto1" name="nomeContacto1" class="form-control input-sm" onkeypress="removerEnter(event)"/></td>
剧本:
function removerEnter(e) {
if (e.which == 13) {
//$(e).target.nextSibling;
//$(this).next('input').focus();
e.preventDefault();
}
}