首页javascriptclassjQuery Style - 如何删除按钮颜色后,通过删除它的类

jQuery Style - 如何删除按钮颜色后,通过删除它的类

我们想知道如何删除按钮颜色后,通过删除它的类。

<!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(){
$(document).ready(function() {
    $('#target').click(function() {
       $(this).removeAttr('style');
    }); 
});
});
</script>
</head>
<body>
  <button style="color: blue" id='target'>here</button>
</body>
</html>