Do HTML5 custom data attributes “work” in IE 6?

后端 未结 6 1880
小鲜肉
小鲜肉 2020-11-22 06:35

Custom data attributes: http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data

When I say “work”, I mean, if I’ve got HTML like this:



        
6条回答
  •  深忆病人
    2020-11-22 06:53

    I think IE has always supported this (at least starting from IE4) and you can access them from JS. They were called 'expando properties'. See old MSDN article

    This behaviour can be disabled by setting the expando property to false on a DOM element (it's true by default, so the expando properties work by default).

    Edit: fixed the URL

提交回复
热议问题