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://www.codercto.com/courses/l/35.html

查看所有标签

Learn Python the Hard Way

Learn Python the Hard Way

Zed Shaw / Example Product Manufacturer / 2011

This is a very beginner book for people who want to learn to code. If you can already code then the book will probably drive you insane. It's intended for people who have no coding chops to build up t......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具