2016-01-04 72 views

回答

0

您需要將相同的類添加到列中。然後,你可以在jQuery的做到這一點:

$('.columnClass input').keypress(function() { 
    if(event.which === 13) { 
     var nextItem = $(this).next('.columnClass input'); 

     if(nextItem.size() === 0) { 
      nextItem = $('.columnClass input').eq(0); 
     } 

     nextItem.focus(); 
    } 
}); 

13是回車鍵

的鍵碼