jsp给select中options赋值,参考方法如下: var t = document.getElementById("select1"); var selectValue=t.options[t.selectedIndex].value;//获取select的值 var t1 = document.getElementById("select2"); for(i=0;i<t1.length;i++){//给select赋值 if(selectValue==t.options[i].value){ t1.options[i].selected=true } }