When you submit a form, does the form look for both "name" and "id" values?
No, just the name attribute
What does the "id" do other than styling it with CSS?
You can use the id to reference the element in the form elements collection.
Say we have a form element referenced by the variable form
, you can access the element (form elements, input , selects, etc.) in the form. With id, say combobox
, then you can access this element via form['combobox']
or form.combobox
. This is also true for the name attribute - http://jsfiddle.net/YQRtR/.