<div id="one">first text for one</div>_x000D_
<div id="one">second text for one</div>_x000D_
_x000D_
var ids = document.getElementById('one');
_x000D_
ids contain only first div element. So even if there are multiple elements with the same id, the document object will return only first match.