Can anyone help me, what is the correct syntax if the id or name of the textbox is an array?
<input type="text" name="txt" id="txt" value="1" />
<input type="text" name="txt[0]" id="txt[0]" value="2" />
<script>
// Msg: 1
alert($('#txt').val());
// Msg: Undefined
alert($('#txt[0]').val());
</script>
Thank you inadvance
[]is used for selecting element by attribute. You need to escape those, to cancel that behaviour: