开发者

Want scan last part id

开发者 https://www.devze.com 2023-04-13 05:51 出处:网络
Want to get input with type=hidden and its id should have \'1_id\' at the end trying to find RegEx unable to do that. Kindly help in this Regard Asap. Thanks

Want to get input with type=hidden and its id should have '1_id' at the end trying to find RegEx unable to do that. Kindly help in this Regard Asap. Thanks

JQUERY 
$('开发者_如何学编程input[type=hidden]# $=*1_id')
Example HTML
<input id="sign_up_parameter_questions_attributes_1_id" type="hidden" value="15" name="sign_up_parameter[questions_attributes][1][id]">

Ideally above specified Jquery should able to find this tag


You don't need a regex:

$('input[id$="1_id"]')

and a link to the jquery doc

Btw, if your id is really unique (as it should be), you can only use:

$('[id$="1_id"]')
0

精彩评论

暂无评论...
验证码 换一张
取 消