IE 和 FF下禁用Ctrl键


<script type="text/javascript">
function stopCtrl(e)
{
var   keyCode = e.keyCode?e.keyCode:e.which?e.which:e.charCode;
if (keyCode==17){
  if(!e.which){
    e.keyCode=0;
    e.cancelBubble = true;//禁用冒泡
    e.returnValue=false;
  }else{
     if (e.stopPropagation) {
         e.stopPropagation();
         e.preventDefault();
      }
   }
   
  }
</script>

你可能感兴趣的:(IE)