-1

How to get the value of the HTML input type with dynamic id name using jQuery

    <td><input id="j_id_id23:hiddenId" type="hidden" name="j_id_id23:hiddenId" value="3" /></td>

The input id name is generated dynamically. So the key for finding specific element is by hiddenId which I can attached to the html input component.

I have done this so far but returning undefined

$('input[id^="hiddenId"]')
Cruze
  • 250
  • 3
  • 18

1 Answers1

0

If id value ends up with known substring hiddenId you can use selector:

$('input[id$="hiddenId"]')
Roman
  • 431
  • 5
  • 11