开发者

Getting all selects with the same selected value in Prototype $$()?

开发者 https://www.devze.com 2023-03-23 23:24 出处:网络
How get all select with the same \"selected value\" in Prototype $$()? Example: all select with \"5\" select value

How get all select with the same "selected value" in Prototype $$()?

Example: all select with "5" select value

<select name="first">
  <option value="">-- Selecione --</option>
  <option value="4">Auxiliar de vistoria</option>
  <option selected="selected" value="5">Examinador</option>
</select>

<select name="second">开发者_如何学Python
  <option value="">-- Selecione --</option>
  <option selected="selected" value="4">Auxiliar de vistoria</option>
  <option value="5">Examinador</option>
</select>

Thanks, Celso


Try:

$$('select:has(option:selected[value=5])')

Fiddle: http://jsfiddle.net/doktormolle/a5t4a/

0

精彩评论

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

关注公众号