Search code examples
javascriptprototypejsselector

Prototype JS: Selecting an element by its value?


I have an input type radio with a unique value. Is it possible to select that radio button by its unique value (147178) using Prototype JS? Thats the radio button:

<input type="radio" class="radio validate-nothing product-custom-option" value="147178">

Thanks!


Solution

  • I haven't used Prototype JS in a while but this should work:

    $$('input[type="radio"][value="147178"]')