How to restrict my input type=“file” to accept only png image files not working in Firefox

后端 未结 6 1698
终归单人心
终归单人心 2020-12-05 07:38

I am using input type=\"file\", Now my requirement is that I only want to select png images, that is when I select browse a \"png\" filter should be applied.

I have

6条回答
  •  自闭症患者
    2020-12-05 07:59

    you can use javascript function onChane event of a file function

    filesChange() {
            checkFile();
            } 
    
    
                                     
                  
提交回复
热议问题