jQuery .class 选择器

jQuery 教程 · 2019-03-09 23:44:06

实例

选取 class 为 "intro" 的所有元素:

$(".intro")

定义和用法

.class 选择器选取带有指定 class 的所有元素。

class 引用 HTML 元素的 class 属性。

class 属性用于为多个 HTML 元素设置特定样式。

注意:不要使用数字开头的 class 属性!在某些浏览器中可能出问题。

语法

$(".class")

参数 描述
class 必需。规定要选取的元素的 class。

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

The Tangled Web

The Tangled Web

Michal Zalewski / No Starch Press / 2011-11-26 / USD 49.95

"Thorough and comprehensive coverage from one of the foremost experts in browser security." -Tavis Ormandy, Google Inc. Modern web applications are built on a tangle of technologies that have been de......一起来看看 《The Tangled Web》 这本书的介绍吧!

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具