forms - Is there any way to have multiple ID:s with same name in one HTML document? -
I have a form that has many tags.
Is it possible:
& lt; Select name = "select1" id = "select1" & gt; & Lt; Option id = "1990" value = "1990" & gt; 1990 & lt; / Options & gt; & Lt; Option id = "1991" value = "1991" & gt; 1991 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Select name = "select2" id = "select2" & gt; & Lt; Option id = "1990" value = "1990" & gt; 1990 & lt; / Options & gt; & Lt; Option id = "1991" value = "1991" & gt; 1991 & lt; / Options & gt; & Lt; / Select & gt;
The IDs are the same ...
thanks
Any ID can only be assigned once because it is identity for only one element, instead you need to use the class but I wonder. Why do you need to provide the same ID? If you specify the same ID for more than one element, and use javascript to manipulate it, then only the last element will be taken care of to ignore all the previous elements ... .
For more information, please see:
Comments
Post a Comment