在HTML中data-value和value有什么区别?

<form>
<input type="text" name="myname" data-value="dhoni" value="sachin">
</form>

在HTML中data-value和value有什么区别?

 

杨天栾2018/10/24 17:31:16
They are both attributes, but the value attribute (together with name attribute) can be natively accessed by most server-side languages. Whereas data-value can only be natively accessed by the client-side. Data attribute can also have different suffix, you could name it; data-name, data-email, data-content, and etc. You could say it's "customizable".