日期:2014-05-16 浏览次数:20434 次
<select name="test"></select>
<script>
var str = '<option value ="volvo">Volvo</option><option value ="saab">Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option>';
var obj = document.getElementsByName("test")[0];
if (window.ActiveXObject)obj.outerHTML=obj.outerHTML.replace(/<\/select>/i,str+'</select>');
else obj.innerHTML += str;
</script>