使用jQuery,如何选择元素id以某些字符串结尾的所有元素? [英] Using jQuery, how to select all elements where element id ends with some string?

查看:77
本文介绍了使用jQuery,如何选择元素id以某些字符串结尾的所有元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用jQuery,如何选择 id 属性以字符串结尾的所有元素?

Using jQuery, how to select all elements where id attribute ends with some string?

推荐答案

attribute-ends-with selector( [attr $ = value] ,如下所示:

There an attribute-ends-with selector ([attr$=value]), like this:

$("[id$=something]")

这篇关于使用jQuery,如何选择元素id以某些字符串结尾的所有元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆