Javascript iPad Return Key事件? [英] Javascript iPad Return Key event?
本文介绍了Javascript iPad Return Key事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在JavaScript页面上,如果用户使用
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");
}
但是当我点击iPad上的返回键时,事件不会触发。我如何捕获事件?
but the event does not fire when I hit the return key on the iPad. How do I catch the event?
推荐答案
iPad键盘 触发按键
如果按回车键,键码为13的事件。这听起来好像你有其他的东西出错了
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
这是一个快速的方法来验证: http://jsfiddle.net/359wG/
Here's a quick jsfiddle to verify with: http://jsfiddle.net/359wG/
这篇关于Javascript iPad Return Key事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文