首页javascriptclassjQuery Style - 如何获取边框值...

jQuery Style - 如何获取边框值...

我们想知道如何获取边框值。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<style type='text/css'>
#item {
  border: 3px solid white;
}

#item.active {
  border-color: #A8402A;
}
</style>
<script type='text/javascript'>
$(window).load(function(){
    $('#item').click(function() {
        $(this).toggleClass('active');
    });
});
</script>
</head>
<body>
  <div id="item">Hello</div>
</body>
</html>