function keypressCheck() {
var keyID = event.keyCode;
//space pressed
if (keyID == 32) {
anotherFunction();
}
}
I want anotherFunction()
to run when the space bar is pressed without the default action of the page scrolling to happen. is there any way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…