首页javascriptmousejQuery Event - 如何句柄悬停事件...

jQuery Event - 如何句柄悬停事件...

我们想知道如何句柄悬停事件。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    $(this).mousemove(function(e) {
        $('.style1').width(e.pageX);
    });
});
</script>
</head>
<body>
  <div style="background-color: red;" class="style1">test</div>
</body>
</html>