<div id="UniDataInt">
<table class="table table-bordered" id="uniResult">
<td contenteditable="true" onfocus="showEdit(this);" class="highlight-border">hello</td>
<td contenteditable="true" onfocus="showEdit(this);" class="highlight-border">hello1</td>
<td contenteditable="true" onfocus="showEdit(this);" class="highlight-border">hello</td>
</table>
</div>
这是我的Jquery代码:
$('#UniDataInt').on('keyup', 'td', function() {
if (e.keyCode == 13)
return e.keyCode = 9;
});
答案 0 :(得分:0)
尝试以下
$(document).ready(function(){
$('#UniDataInt').on('keydown', 'td', function(e) {
if (e.keyCode == 13){
e.preventDefault();
$(this).next().focus();
}
}); });