I thought that adding a "value"
attribute set on the <select>
element below would cause the <option>
containing my provided "value"
to be selected by default:
(我认为在下面的<select>
元素上添加"value"
属性集会导致默认情况下选中包含我提供的"value"
的<option>
:)
<select name="hall" id="hall" value="3"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select>
However, this did not work as I had expected.
(但是,这没有按我预期的那样工作。)
How can I set which <option>
element is selected by default? (如何设置默认选择哪个<option>
元素?)
ask by Jichao translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…