jQuery [attribute^=value] 选择器

jQuery 教程 · 2019-03-10 16:13:24

实例

选取所有带有以 "nation" 开头的 name 属性的 <input> 元素:

$("input[name^='nation']")

定义和用法

[attribute^=value] 选择器选取每个带有指定属性且以指定字符串开头的元素。

语法

$("[attribute^='value']")

参数 描述
attribute 必需。规定要查找的属性。
value 必需。规定属性值以其开头的字符串。

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

查看所有标签

Mobilizing Web Sites

Mobilizing Web Sites

Layon, Kristofer / 2011-12 / 266.00元

Everyone has been talking about the mobile web in recent years, and more of us are browsing the web on smartphones and similar devices than ever before. But most of what we are viewing has not yet bee......一起来看看 《Mobilizing Web Sites》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

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

UNIX 时间戳转换