JavaScript Gotchas!

Stumbled upon this by accident:

The following JavaScript code …

.. will actually display

Selection_001

 

Apparently, it seems “The JavaScript DOM bindings allow indexing by HTML id” as explained at http://www.evotech.net/blog/2008/10/13-javascript-gotchas/#idconflicts.

Gosh! Even after so many years I never knew this 🙁