开发者

Stop input type file from opening 'file selection window'

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜