<Select> tag, do not write property value in select tag! ! !

<select>

select the tab, a selection box label, in development will often use this tag, such as selecting birthday 19 years **, or select the 'original' when segmentfault edit the article, 'reproduced' or 'translation' and so on, use quite a lot, it is a good selection of native frame

It is different according to different mobile phones will be in the form of a mobile terminal

(1) exhibits a bottom block select ejection slide, slides ios select, as

ios

(2) on my phone is millet pop a modal form, click to click to select, as

android

I stepped on a pit in the project vue

I add select a tag attribute, value, a bound variable, call onchange event to change the value to change when the select value, thereby changing the value of the select box is checked.

Doing so would result, for the first time the pop-up selection box, select the default first, selectedIndex to 0, and then click, and select other values, selectedIndex becomes a -1 manifestation is, in Andrews, the pop-up selection box, but value is not selected, the pop-up box in ios, but in default on the first item.

In fact superfluous, select will automatically switch to this value, and save the values, click the Default value after the next to the last choice. It does not have this value property, not the property value, not the value property! !
Here are the documentation w3cSchool
image description

Guess you like

Origin www.cnblogs.com/baimeishaoxia/p/11879339.html