<script type="text/javascript"> var brand='${xxx}'; if(brand!=""){ var s = document.getElementById("brand"); var ops = s.options; for(var i=0;i<ops.length; i++){ var tempValue = ops[i].value; if(tempValue == brand) { ops[i].selected = true; break; } } } </script>
原文地址:http://blog.csdn.net/xuke6677/article/details/42081277