日期:2014-05-20  浏览次数:20673 次

求救 关于select的滚动条的问题
<select   id= "SelectBox_List03 "   name= "SelectBox_List03 "   size= "12 "   class= "inp_select "   style= "width:202px;height:341px; "   onchange= "SelectBox_List03_Change(); ">
</select>
动态的追加option

现在出现个问题,当画面刷新的时候,没有被选中的场合,滚动条的位置不变,
如何在这种时候,把滚动条的位置调到最上端

select的滚动调的位置是否可以通过javascript来控制?

急阿

哪位大虾指导一下

------解决方案--------------------
vup
------解决方案--------------------
捧场,顶顶顶

------解决方案--------------------
<body onload= "setPosition(); ">
function setPosition(){
document.getElementById( "SelectBox_List03 ").selectedIndex=0;
document.getElementById( "SelectBox_List03 ").selectedIndex=-1;
}
------解决方案--------------------
elem.options[0].selected = true;
改成
elem.options[0].selected ;
------解决方案--------------------
错了,是
elem.selectedIndex = 0;
------解决方案--------------------
elem.options[0].selected = false