我对此代码有一些问题
<input type="text" id="search-qq">
<script>
$('#search-qq').keypress(function(event) {alert('key pressed');});
</script>
此代码在我的电脑上工作,
但为什么这段代码不适用于我的android(默认浏览器,
android 2.3.6)??
答案 0 :(得分:0)
可能原因是alert
适用于javascript,而在Android中它可能使用AlertDialog
而不是alert
?并不是任何可以在网络上运行的代码也可以在移动设备上运行,如果你想编写移动网站,你应该使用jQuery mobile,看看:JQuery Mobile