html element id as javascript variable

前端 未结 3 1688
感动是毒
感动是毒 2021-02-19 17:10

Consider the following code:





      
3条回答
  •  猫巷女王i
    2021-02-19 17:18

    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. :)

提交回复
热议问题