tags:

views:

24

answers:

2

I thought some thing like this would work:

<select name="hall" id="hall" value="3">
    <option>
    1
    </option>
    <option>
    2
    </option>
    <option>
    3
    </option>
    <option>
    4
    </option>
    <option>
    5
    </option>
</select>

But it didn't. So How could I set a default value for select?

Thanks.

+2  A: 
<select name="hall" id="hall"> 
    <option> 
    1 
    </option> 
    <option> 
    2 
    </option> 
    <option selected> 
    3 
    </option> 
    <option> 
    4 
    </option> 
    <option> 
    5 
    </option> 
</select> 
RedFilter
+2  A: 

Set selected="selected" for the option you want to be the default.

<option selected="selected">
3
</option>
Borealid