remove

UK [r??muv]

vt. ??, ??

vi. ??, ??; class

English[klɑ:s] US[kl?s]

n.Class; grade; kind

vt.... ?? ???? ????(?? ????, ????); ...? ?? ???? ??

adj. ?? ??, ???, ???

vi.... ????(?? ??)? ??, ?? ????(?? ??)? ???

jqueryremoveClass() ??? ???

??: removeClass() ???? ??? ???? ?? ??? ???? ?????. ????? ???? ?? ?? ? ???? ??? ???? ?? ???? ?????.

??: ??$(selector).removeClass(class)

????:

???? ??
class ????. ??? ???? ??? ?????. ?? ???? ????? ??? ???? ??? ??? ?????. ? ????? ???? ??? ?? ???? ?????.

??? ???? ??? ??: ??? ???? ??? ???? ???? ?????.

??: ??$(selector).removeClass(function(index,oldclass))

????:

ParametersDescription
function(index,oldclass) ?????. ??? ???? ??? ???? ?????.
index ?? ?????. ???? ??? ??? ?????.
html ????. ???? ?? ??? ?? ?????.

jqueryremoveClass() ??? ?

<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $("p").removeClass("intro");
  });
});
</script>
<style type="text/css">
.intro
{
font-size:120%;
color:red;
}
</style>
</head>

<body>
<h1 id="h1">This is a heading</h1>
<p class="intro">This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>從第一個段落中刪除類</button>
</body>
</html>
???? ?? ?

??? ????? ??? "???? ??" ??? ?????