What's the difference with html5 data-* custom attributes.
曾经蜡笔没有小新2017-07-05 09:55:59
0
3
723
<li data-animal="fish">Salmon</li> and<li animal="fish">Salmon</li> New What is the difference between html5 custom attributes and ordinary defined attributes? They are both defined attributes.
1. Normative
2. Have a dedicated interface
dataset
As mentioned above, the access methods of properties are different.
In the IDE, no warning will be reported if there is a data- prefix.