It's an old IE feature, not recommended to use. Several browsers implement it, often as nonenumerable properties of the window object. FF, for example, does it only in quirks mode.
For further reading see duplicate Is there a spec that the id of elements should be made global variable?...