首页 >> 编程资讯

javascript 回车事件捕捉(js enter事件)

2011-12-17 23:01:51

javascript 回车事件捕捉(js enter事件)
 
<script type="text/javascript">
 
    document.onkeydown = function (event) {
 
        e = event ? event : (window.event ? window.event : null);
 
        if (e.keyCode == 13) {
 
           alert("深蓝IT,网址: www.shenlanit.com");
 
        }
 
    } 
 
</script>