Javascript iPad Return Key event?

前端 未结 2 647
无人共我
无人共我 2021-01-21 09:54

On a JavaScript page, I pop up an alert if the user hits the enter key by using

if(evt.keyCode == 13){
    alert(\"Return Key Pressed\");
}

but

2条回答
  •  灰色年华
    2021-01-21 10:43

    The iPad keyboard does fire the keypress event with a key code of 13 if you press return. This sounds like you've got something else going awry

    Here's a quick jsfiddle to verify with: http://jsfiddle.net/359wG/

提交回复
热议问题