0

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

1

1 Answer 1

2

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/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.