首页javascriptmousejQuery Event - 如何检查移动或控制键是否在单击时保持...

jQuery Event - 如何检查移动或控制键是否在单击时保持...

我们想知道如何检查移动或控制键是否在单击时保持。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-2.1.0.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    $('.a').on('mouseenter', function(e){
        $('.b').css('color','red')    
    });
    $('.a').on('mouseleave', function(e){
        $('.b').css('color','black')    
    });
});
</script>
</head>
<body>
  <div class="a">Hover here</div>
  <br>
  <div class="b">Something else</div>
</body>
</html>