Form elements names and ids with jquery
Posted on 2014-12-02
Can form elements have the same name and id such as
<input name="somename" id="somename">
and still work with jquery
I know each element must have a unique id but i was wondering if there was any reason why they couldnt have the same name and id
In fact I'm not even sure if they need both a name and an id. I know an id is convenient for referencing the element in code and i know elements needs a name to be serialised for form submission.