Loops are added to the select in the page, but the missing ID is not defined in the IE8, and the last comma of the array is tested and the comma is removed.
Have been programming with JavaScript recently, using JSON, I wrote the array [{' id ': ' key_01 ', ' name ': ' The University '},{' ID ': ' key_02 ', ' name ': ' Direct send card '},{' id ': ' key_03 ', ' name ' : ' Freshman '},{' id ': ' key_04 ', ' name ': '},{' id ': ' key_05 ', ' name ': ' Dynamic zone sleeve card '},{' id ': ' key_06 ', ' name ': ' Inventory '},{' id ': ' key_07 ', ' Name ': '},{' id ': ' key_08 ', ' name ': ' Mobile video '},{' id ': ' key_09 ', ' name ': ' School Communication '};
Loops are added to the select in the page, but in the IE8 has always been prompted missing ID undefined, in other browsers are OK, and later use IE8 JS debugging, found that his array length than in other browsers in the length of the array 1, while the actual view of the array does not have so many values, and then look carefully, Only to find the last comma of the array, the comma removed the good.
The original IE8 get the actual value and length of the time the method is not the same, can not at the end of the array add extra commas.