How to select first empty value option in a select menu??

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-05-07T12:11:34Z Indexed on 2010/05/07 12:18 UTC
Read the original article Hit count: 163

Filed under:
|

Hi there,

The following always preselects the last option, but i like the first option to be preselected?

<select name="filter">
    <option value="" selected>Make a choice</option>
    <option value="1">1</option>
    <option value="3">3</option>
    <option value="7">7</option>
    <option value="">all</option>
    </select>

even with the first selected??

Can this be done??

© Stack Overflow or respective owner

Related posts about option

Related posts about html