标签:
<script type="text/javascript">
document.onkeydown=keyDownSearch; function keyDownSearch(e) { // 兼容FF和IE和Opera var theEvent = e || window.event; var code = theEvent.keyCode || theEvent.which || theEvent.charCode; if (code == 13) { getTableListData();//具体处理函数 return false; } return true; } </script>
如果只是针对某个DIV层应用回车查询的话,可以将: document.onkeydown=keyDownSearch; 改成: document.getElementById(‘层ID‘).onkeydown=keyDownSearch;
标签:
原文地址:http://my.oschina.net/u/2345713/blog/468550