Reputation: 55
I want to know what data-url
does in a input
function? example there is this thing in the code I am working on - <input id="something" type="file" name="files[]" data-url="/index.php">
Can someone please tell me what data-url
does
Thanks
Upvotes: 0
Views: 80
Reputation: 207901
Nothing. data-*
is a custom data attribute you can use to store whatever you like. https://hacks.mozilla.org/2012/10/using-data-attributes-in-javascript-and-css/. Essentially it's a simple way to store data to be used by scripts.
As the W3 states:
Custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.
See also: http://ejohn.org/blog/html-5-data-attributes/
Upvotes: 2