$( document ).ready(function() {
$("*").keydown(function(e) {
if (e.which == 38) {
// $(this).nextAll('input').first().focus();
$(this).prev(":text").focus();
} else if (e.which == 40 ) {
$(this).next(":text").focus();
}
});
});
Я уже пробовал это с несколькими другими jQuery селекторами, такими как (":input",":text")
, но они работают только на HTML страницах, а не на JSP страницах.