how to make accept
attribute accepting css
file type or js
files ?
<input type="file" name="NAME" id="fileinput2" accept=".css" onchange="check()" />
thank you
how to make accept
attribute accepting css
file type or js
files ?
<input type="file" name="NAME" id="fileinput2" accept=".css" onchange="check()" />
thank you
Like this:
<input type="file" name="NAME" id="fileinput2" accept=".css,.js" />
But W3C recommends to specify both MIME-types and corresponding extensions in the accept attribute. So, the best approach would be:
<input type="file" name="NAME" id="fileinput2" accept=".css, .js, text/css, application/x-javascript" />
For complete Mime types Refer this
You can use comma separated value for accept
attribute.
Like this:
<input type="file" name="NAME" id="fileinput2" accept=".css,.js" onchange="check()" />
Separate each extension by a comma
<input type="file" name="NAME" id="fileinput2" accept=".css, .js" onchange="check()" />