1.需求:默认a2为选中!!

<select name="" id="chose" autocomplete="off">
    <option value="a0">a0</option>
    <option value="a1">a1</option>
    <option value="a2">a2</option>
    <option value="a3">a3</option>
</select>

document.getElementById('chose').getElementsByTagName('option')[2].selected = true;
document.getElementById('chose')[2].selected = true;

 

posted on 2013-03-21 18:00  somesayss  阅读(259)  评论(0编辑  收藏  举报