Home > front end >  Js, how to realize the press enter equal to press a key on the keyboard other
Js, how to realize the press enter equal to press a key on the keyboard other

Time:05-23

Js, how to realize the keyboard events press enter equal to press a key on the keyboard other

CodePudding user response:

Add a onkeydown, events in writing if judge if the event keycode=13 put other keycode key assigned to the current event. The keycode

CodePudding user response:

//in jquery reads
$(" # clientorderlist input "). The keydown (function (event) {
If (event. The keyCode==13) {
//TODO
}
});

CodePudding user response:

refer to the second floor ywtywt337 response:
//jquery reads
$(" # clientorderlist input "). The keydown (function (event) {
If (event. The keyCode==13) {
//TODO
}
});
this also just monitor keyboard events, want is my keyboard press enter, equivalent to press the TAB key