How can I select a hidden field by value?

前端 未结 3 2031
闹比i
闹比i 2021-02-06 23:41

I have the following HTML generated by an ASP.NET repeater:

3条回答
  •  别那么骄傲
    2021-02-07 00:12

    Using jQuery Selectors, you can target your element by a certain attribute matching the desired value:

    $('input[value="Whatever"]');
    

    This way you are targeting an input element, by the attribute value that is equal to the desired value.

    EDIT 5/14/2013: According to an answer below, this no longer works as of jQuery 1.9.

提交回复
热议问题