Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何为选项的空值或空值设置默认值:
HTML:
<select name="master_id" id='master_id' > <option value=""> - - - </option>
或者
<select name="master_id" id='master_id' > <option> - - - </option>
演示
我找到了:
查询
$('#test option:not([value])').prop('selected', true)