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/)。你得到的错误是什么? –