案例:jquery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js"></script>
5
<script>
6
$(document).ready(function(){
7
  $("button").click(function(){
8
    $("h1,h2,p").removeClass("blue");
9
  });
10
});
11
</script>
12
<style type="text/css">
13
.important
14
{
15
font-weight:bold;
16
font-size:xx-large;
17
}
18
.blue
19
{
20
color:blue;
21
}
22
</style>
23
</head>
24
<body>
25
26
<h1 class="blue">标题 1</h1>
27
<h2 class="blue">标题 2</h2>
28
<p class="blue">这是一个段落。</p>
29
<p>这是另一个段落。</p>
30
<br>
31
<button>从元素上删除类</button>
32
</body>
33
</html>
34