开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜