摘要:
你常常需要做的两件事:监听用户按下了哪一个键和当前事件的对象,IE和FireFox的实现是不同的。下面是常见的一种写法:functionlistenEventAndCode(e){varcode=null;if(!e)e=window.event;if(e.keyCode)code=e.keyCode;elseif(e.which)code=e.which;//dosomethinghere;}下... 阅读全文
posted @ 2010-02-05 23:35
高凡凡高
阅读(3029)
评论(1)
推荐(0)

浙公网安备 33010602011771号