What are “data-url” and “data-key” attributes of tag?

前端 未结 4 1001
傲寒
傲寒 2020-12-13 07:25

I\'ve faced two strange attributes of an html tag . They are \"data-url\" and \"data-key\".

What are they and how

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 07:55

    data-* attributes are for adding arbitrary data to an element for use solely by the code (usually client side JavaScript) running on the site hosting the HTML.

    In order to tell what the three examples you give are for, we would have to reverse engineer the code that comes with them (unless they are documented on the sites) since they don't have standard meanings.

提交回复
热议问题