Suppose I have input[type=file] element and I want to intercept onclick event and prevent file dialog from appearing if conditions are not met. Is it possible? And why, if – not?
Suppose I have input[type=file] element and I want to intercept onclick event and prevent
Share
Soufiane’s code requires that you have a Javascript library called jQuery on your page. If you don’t have it, you can get it at http://www.jquery.com or use something in plain Javascript:
HTML
JS: