设置下拉框默认值
能不能在只知道下拉框的<option>value 属性的情况下 来在<script></script> 里 写这个方法 来设置 这个下拉框的默认值?
[解决办法]
function check(){ var sel = document.getElementById("abc");//abc为你的select的id for(var i=0 ;i<sel.options.length;i++){ if(sel.options[i].value==你知道的value){ sel.options[i].selected=true; } } }
[解决办法]