为什么我文本框的回车时onkeyup事件捕捉不到啊 如题,求高手解答? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>event.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript"> function test(e) { e = event || window.event; if (e.keyCode == 13) { alert("your press enter key"); } } </script> </head> <body> <input id="btn" type="text" value="click" onkeyup="test(event)"/> </body></html> 键盘捕捉 一般是 keypress keydown keyup在各个浏览器中兼容性各不一样 网上已经有这个很全文章了http://hi.baidu.com/%D3%F0%E9%E4%C8%CA/blog/item/2922c9e9bed5b238b90e2d6b.html 据说是网易的一道面试题,各位帮忙看看怎么做 問題請教用jquery實現下圖樣式 謝謝 js怎么做像 腾讯网-我的资讯(今日要闻) 导航左右滚动的的特效 请问一个jquery语句 一个图层显示的问题,谢谢大家 急,怎么屏蔽掉提示的信息? 求助 javascript 如何实现隔1分钟就 document.all.Button1.click(); 一次? 为什么显示不出来width的值???请教........... 来者有分,急求,在线等待,关于病毒 json开发需要哪些包? 如何nokia widget 的JS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>event.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function test(e) {
e = event || window.event;
if (e.keyCode == 13) {
alert("your press enter key");
}
}
</script> </head>
<body>
<input id="btn" type="text" value="click" onkeyup="test(event)"/>
</body>
</html>
在各个浏览器中兼容性各不一样
网上已经有这个很全文章了
http://hi.baidu.com/%D3%F0%E9%E4%C8%CA/blog/item/2922c9e9bed5b238b90e2d6b.html