开发者

How to get element id respect to style class using Mootools

开发者 https://www.devze.com 2023-01-29 09:08 出处:网络
Consider following structure <div class=\"form-final-label\" id=\"1_30_17-label\"> <label class=\"required\" for=\"1_30_17\">Business/Store Name</label>

Consider following structure

<div class="form-final-label" id="1_30_17-label">
<label class="required" for="1_30_17">Business/Store Name</label>
</di开发者_StackOverflowv>
<div class="form-final-label" id="1_32_17-label">
<label for="1_32_17">First Name</label>
</div>
<div class="form-final-label" id="1_34_17-label">
<label for="1_34_17">Last Name</label>
</div>

How can I get all label's for attribute with respect to class required using Mootools.ie, here I would like to retrieve 1_30_17.

Any help please


According to this you should be able to do something like:

$('1_30_17-label').getElements('label[for=1_30_17]');
0

精彩评论

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

关注公众号