搜索提示菜单 上下键取值 怎么屏蔽滚动条 本帖最后由 starlit53 于 2011-06-01 10:09:29 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.onkeydown 改成 document.getElementById("city").onkeydown 试试 。 document.getElementById("city").onkeydown 外层容器的onkeydown 好像不行哦,用了就上下键 就直接无效了。 <input type="text" id="words" /> <script type="text/javascript"> document.body.onkeydown = function () { document.getElementById("words").value = "123";//function(){do smthing;} //做完该做的,return false return false; } </script> 合并了两行的 在代码中怎么写呢? 新手求教 js 请求webservice 问题 如何在onclick中传递数组或对象 赋值出错? 向大神求助,js事件触发问题 js如何实现多步的撤销反撤销功能 要iframe中实现 如何能让动态生成的按钮能够触发onClick事件? 这样的功能能实现吗? JS如何获取<s:property value="aa"/>的值 js设置css的问题 大家帮看下哪里不符合标准?
试试 。
外层容器的onkeydown 好像不行哦,用了就上下键 就直接无效了。
<script type="text/javascript">
document.body.onkeydown = function () { document.getElementById("words").value = "123";//function(){do smthing;}
//做完该做的,return false
return false;
}
</script>