senior
senior

Reputation: 2266

Jquery, get elements with element name starts with a giving string

How using jquery get all input text elements whith a name starts with 'productElement'

Upvotes: 0

Views: 67

Answers (1)

Felix
Felix

Reputation: 38102

You an use attribute starts with selector [name^="value"]:

Selects elements that have the specified attribute with a value beginning exactly with a given string.

$('input[name^="productElement"]')

Upvotes: 1

Related Questions