I know document.getElementsByName works differently in IE and Firefox, in IE, it returns HTMLCollection, while in Firefox, it returns NodeList.
In Firefox, the code is working correctly, while in IE, it always return length 0. The IE version is 11.
The code is:
var fullToken = document.getElementsByName("0");
console.log(fullToken.length);
<span name ="0">h</span>
<span name ="0">e</span>
<span name ="0">l</span>
<span name ="0">l</span>
<span name ="0">o</span>