Reputation: 10484
I need to select an item with an id
value that is not always the same (depending on amount of radio buttons set by Code Behind of ASP.NET WebForms). What is unique is the valuethat belongs to the input field.
<input id="ctl00_ContentPlaceHolder1_RadioButtonList_2" type="radio"
name="ctl00$ContentPlaceHolder1$RadioButtonList" value="21" />
How can I obtain this input element with JavaScript that works in IE8?
Upvotes: 0
Views: 185
Reputation: 1897
Yes, It is possible. You can do it by following way:-
$(function(){
element = $('input[value="The unique value"]');
/*do whatever you want with this element*/
});
follow this answer for more info: jquery find element by text
Upvotes: 1