I have a select field with some options in it.
(我有一个选择字段,里面有一些选项。)
Now I need to select one of those options with jQuery.(现在,我需要使用jQuery选择这些选项之一。)
But how can I do that when I only know the value of the option that must be selected?(但是,当我只知道必须选择的选项的值时,该怎么办?)
I have the following HTML:
(我有以下HTML:)
<div class="id_100"> <select> <option value="val1">Val 1</option> <option value="val2">Val 2</option> <option value="val3">Val 3</option> </select> </div>
I tried to do this with a tag but this does not work.
(我尝试使用标签来执行此操作,但这不起作用。)
Please tell me about other ways.
(请告诉我其他方法。)
Thanks in advance
(提前致谢)
ask by Илья Равин translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…