"Select" element and cross-browser passing data
I've always provided value="something"
for my option
elements inside an element select
.
In this way
<select>
<option value="true">True</option>
</select>
Now that I've done this with countries, there is a lot of extraneous data in it. I'm sure if I remember correctly that Firefox will send text between tags if the value attribute is missing.
My question is, is this behavior the norm? Can I rely on all browsers to send the innerHTML of an option element if the value attribute is omitted?
thanks
a source to share
Hidden from W3C :
value = cdata [CS] This attribute specifies the initial value of the control. If this attribute is not specified, the initial value is set to the content of the OPTION element.
With that, I would think that every major standard compliant browser should accept the "value" attribute, and if not present, take the element
a source to share