In the jq event, the next dom gets focus

$lastGoodsgrid.on("keydown",
                "[colname="F_GoodsName"] > input",
                function(e) {
                        if (e.keyCode == 13) {
                            //input
                        }        
                }

how do multiple input, make the next input get focus? How do I get the next input object? Thank you

Mar.25,2021

. Next ()


$(this). Next (). Focus ()


13 is an enter, and the default action for carriage return should be to submit the form instead of jumping to the next item. Jump to the next item should press the Tab key, there is standard behavior, use tabindex control, do not do anything.


$(this). Next (). Val ();-- get the value for the input tag

$(this). Next (). Text ();-for span or textarea tags, get the value

Menu