close

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("h1").removeAttr("style");
  });
});
</script>
</head>
<body>

<h1 style="color:blue">H1 藍色</h1>

<h1 style="color:red">H1 紅色</h1>

<button>Remove</button>


</body>
</html>


arrow
arrow
    文章標籤
    css style remove attr
    全站熱搜

    Roger 發表在 痞客邦 留言(0) 人氣()