txt1.onkeydown = function(ev){
var oevent = ev||event;
if(oevent.ctrlKey && oevent.keyCode == 13){
……
}
}
txt1: The object to which the event is bound, for example: a text input box input.
oevent: event object (contains many useful details of the event).
keyCode: You can get the key value pressed on the keyboard. For example: the Enter key is 13.
ctrlKey: is a Boolean value, indicating whether the ctrl key on the keyboard is pressed. (Of course: altKey, shiftKey).
The above code means: press the ctrl and enter keys to execute the statement in the ellipsis.