开发者

Stop input type file from opening 'file selection window'

开发者 https://www.devze.com 2023-04-12 07:21 出处:网络
How can I stop input type=file from opening \'file selection window\' without disabling it? Any method I can try using jquery or javascript?

How can I stop input type=file from opening 'file selection window' without disabling it? Any method I can try using jquery or javascript?

To reply the comments below:

Yes, this is not a mistake. I need this input file type. My situation here is that I want the user to select file once, after that, it will stop user from selecting again, but not dis开发者_开发技巧abling it.


js:

$file.click(function(event){
  if (!theFirstClick) {
    event.preventDefault();
  }
  ...
});
0

精彩评论

暂无评论...
验证码 换一张
取 消