解决方法
你可以这样改变:
var ddl = document.getElementById('ddl-id'); var opts = ddl.options.length; for (var i=0; i<opts; i++){ if (ddl.options[i].value == "some-value"){ ddl.options[i].selected = true; break; } }