is there any way that html element file
<input name="file1" type="file" style="width:300px">
only accept PDF files and when we browse its only show PDF files...
Thanks
is there any way that html element file
<input name="file1" type="file" style="width:300px">
only accept PDF files and when we browse its only show PDF files...
Thanks
No way to do that other than validate file extension with JavaScript when input path is populated by the file picker. To implement anything fancier you need to write your own component for whichever browser you want (activeX or XUL)
There's an "accept" attribute in HTML4.01 but I'm not aware of any browser supporting it - e.g.
accept="image/gif,image/jpeg
- so it's a neat but impractical spec