I'd like to find all the inputs that have at the end of their names the keyword [0]. I guess I have to use the following method:
$("input[name=name]")
But how to specify only a part of the name?
I'd like to find all the inputs that have at the end of their names the keyword [0]. I guess I have to use the following method:
$("input[name=name]")
But how to specify only a part of the name?
Might be you want this
$("input[name$=name]");
Select all elements with a name attribute value ending with
name.
Use jQuery's Attribute Ends With Selector ($=) to match things at the end of the attribute:
$("input[name$='name']")
Description: Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.
If you want to match input elements whose name attribute ends in "[0]", you'd use:
$("input[name$='[0]']")
Might be you want this Check the manual here
$( "input[name$='letter']" );
or
$("input[name^='name[']");