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? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -