jQuery addClass() 方法
jQuery 教程
· 2019-03-27 10:57:36
实例
向第一个 <p> 元素添加一个类名:
$("button").click(function(){
$("p:first").addClass("intro");
});
定义和用法
addClass() 方法向被选元素添加一个或多个类名。
该方法不会移除已存在的 class 属性,仅仅添加一个或多个类名到 class 属性。
提示:如需添加多个类,请使用空格分隔类名。
语法
$(selector).addClass(classname,function(index,oldclass))
| 参数 | 描述 |
|---|---|
| classname | 必需。规定一个或多个要添加的类名称。 |
| function(index,currentclass) | 可选。规定返回一个或多个待添加类名的函数。
|
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
The Probabilistic Method
Noga Alon、Joel H. Spencer / Wiley-Interscience / 2008-8-11 / USD 137.00
Praise for the Second Edition : "Serious researchers in combinatorics or algorithm design will wish to read the book in its entirety...the book may also be enjoyed on a lighter level since the diffe......一起来看看 《The Probabilistic Method》 这本书的介绍吧!