jquery - Getting a specific field by name? -


i have form number of fields, each same name:

<input type="text" name="title[]" placeholder="title" value="a"> 

how can specific field?

i have tried:

console.log($('input[name=title[]]').val()); 

but no luck.

as @adrift mentions, need wrap name attributes in quotes because has special character's. once done can use eq() enter index value of element specific input element-

console.log( $('input[name="title[]"]').eq(3).val() ); 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -