i want to know the exact difference between form id and form name used in html.
+4
A:
Possible duplicate http://stackoverflow.com/questions/1397592/difference-between-id-and-name-tag-attributes-html
dkris
2010-05-25 10:34:21
+1
A:
Do you mean on the form's elements: e.g. button/input/select & textarea elements?
If so, the name attribute is what is sent when the form is submitted. The id attribute uniquely identifies any element on the page.
The best example I can think of is radio buttons.
Each radio button belongs to a set, and the set has a name. However you may want to link to a particular button by id.
<input type="radio" name="color" id="c1" value="r"/><label for="c1">Red</label>
<input type="radio" name="color" id="c2" value="y"/><label for="c2">Yellow</label>
<input type="radio" name="color" id="c3" value="b"/><label for="c3">Blue</label>
When the form is submitted, only the selected option is sent: (e.g. Yellow)
?color=y
scunliffe
2010-05-25 10:37:33