首页javascriptkeyjQuery Event - 如何悬停时切换类样式...

jQuery Event - 如何悬停时切换类样式...

我们想知道如何悬停时切换类样式。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.4.4.min.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    $('.searchWord').live('keypress', function(e) {
        if(e.keyCode == 13) {  
            $('.bBtnSearchBoard').trigger('click');
        }
    });
    $('.bBtnSearchBoard').live('click', function() {
         console.log('a');
    });
});
</script>
</head>
<body>
  <input type="text" class="searchWord" />
  <br>Hit enter key to see the result
  <input type="button" class="bBtnSearchBoard" value="Button" />
</body>
</html>