Javascript examples for DOM HTML Element:Input FileUpload
Input FileUpload disabled Property - Disable and enable a FileUpload button:
<!DOCTYPE html> <html> <body> Get Image: <input type="file" id="myFile"> <br> <button onclick="disableBtn()">Disable File Upload</button> <button onclick="enableBtn()">Enable File Upload</button> <script> function disableBtn() {// w ww. java 2 s . c om document.getElementById("myFile").disabled = true; } function enableBtn() { document.getElementById("myFile").disabled = false; } </script> </body> </html>