function xxxx(){if(window.event.Keycode==16 ){ 要执行的语句块。
}
}

解决方案 »

  1.   

    <script>
    document.onkeydown=function(event){
    if (event.which==16) alert('shift')
    if (event.which==17) alert('ctrl')
    }
    </script>
      

  2.   

    怎么会不起作用? 是你没用对吧
    <script>
    document.onkeydown=function(event){
    if (event.shiftKey) alert('shift')
    if (event.ctrlKey) alert('ctrl')
    }
    </script>
      

  3.   

    FF中是没有event.ctrlKey 和event.shiftlKey,用前面几位的方法就好!!
      

  4.   

    firefox里的event对象和IE里的event使用方法不一样
      

  5.   

    FF中是没有event.ctrlKey 和event.shiftlKey,用前面几位的方法就好!!谁说没有? 请你试过代码后再下结论!