为Jquery选择器编写正则表达式

时间:2013-07-19 09:19:58

标签: jquery

我想在Jquery中为选择器编写正则表达式   我有一个ID为r1:0:newPincode098SelState::content的组件,其中newPincode098SelState是常见的,另一部分会因不同的组件而异  页面。我想为包含上面字符串的所有组件调用.On()函数。

到目前为止,我已尝试$("input:contains('newPincode098SelState')"),但这无效。

2 个答案:

答案 0 :(得分:1)

$("input:regex(attributeName, yourRegexp)")

答案 1 :(得分:0)

尝试 - attribute-contains-selector

$("input[id*='newPincode098SelState']")
相关问题