3
我似乎無法將項目追加到Internet Explorer 8中的<select>
元素。下面是代碼,它在Chrome和Internet Explorer 9中完美工作,有另一種方法我應該做它可以在Internet Explorer 8中工作嗎?Internet Explorer 8中的<select>元素附加錯誤
$("#" + data[0].Name).append($('<option/>', {
value: data[i].Values[k].Value,
text: data[i].Values[k].Label
}));
您使用的是最新版本的jQuery? –
我正在使用1.5.1,我更改了此使用此http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js之一,但仍然錯誤仍然存在。 – Captain0
你的代碼似乎沒有任何問題。我沒有測試jQuery 1.5.1,但是你可以看到它[在1.5.2中正常工作](http://jsfiddle.net/AndyE/cCLyt/1/)。你得到的錯誤是什麼? –