jQuery追加不在Internet Explorer中工作
我有一个返回JSON
数据的jquery函数:此函数适用于Google Chrome,但不适用于Internet Explorer(v11)。
$(document).ready(function () { $.ajax({ url: "/../Projects/1/_vti_bin/ListData.svc/Prosjectlist?$select=ID,Tittel,Project_typeValue,Project_heading&$filter=(Project_typeValue%20eq%20%27Type1%27)", method: "GET", dataType: "JSON", headers: { "accept": "application/json; odata=verbose" }, success: function (data) { $('#projectRow').empty(); $.each(data.d.results, function (index, item) { var itemExist = false; $.each($('.projectRow').find('h1'), function (index1, item1) { if (item1.innerHTML == item.Project_heading) { itemExist = true; $(item1).parent().append("" + item.Title + "
"); } }); if (itemExist == false) $('.projectRow').append("" + item.Project_heading + "
" + item.Title + "