html element id as javascript variable

前端 未结 3 1999
后悔当初
后悔当初 2021-02-19 16:43

Consider the following code:





      
3条回答
  •  执笔经年
    2021-02-19 17:21

    First off, how long has this "feature" been around?

    It is a Microsoft-ism that cropped up around IE 4 if I remember correctly.

    Some other browsers have added support for it in an effort to be compatible with badly written code that depends on it. Some may only support it in quirks mode.

    this doesn't seem like a very good "feature" to have

    Correct. Don't use it. :)

提交回复
热议问题