我使用此处的代码http://www.korvus.com/blog/geek/making-the-tab-key-work-with-jeditable-fields/来获取工作在jeditable字段之间的选项卡,并且如果这些字段本身可以正常工作,不过,我需要将我的字段放在一个表中,并且唯一一次Tab键的作用是从最后一个字段到第一个字段,当然,我需要它从第一个字段到下一个字段,依此类推......在表格中的jeditable字段之间切换
$('div.edit').bind('keydown', function(evt) {
if(evt.keyCode==9) {
$(this).find("input").blur();
var nextBox='';
if ($("div.edit").index(this) == ($("div.edit").length-1)) {
nextBox=$("div.edit:first"); //last box, go to first
} else {
nextBox=$(this).next("div.edit"); //Next box in line
}
$(nextBox).click(); //Go to assigned next box
return false; //Suppress normal tab
};
});
表的格式像这样提前
看到http://stackoverflow.com/questions/885616/tab-key-with-jeditable-fields – 2011-09-01 14:14:42