html - javascript accept only image not working -


in code want accept image file.otherwise not accept , give alert not image file.

i have done below code in jsfiddle:--

jsfiddle link

but problem it..it not giving message.what doing wrong?

https://jsfiddle.net/weufx7dy/2/

you forgot add id on file element

<input type="file" id="file" name="fileupload" size="50" /> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

android - How to prevent keyboard from closing when bottom dialog is open? -