Javascript examples for DOM HTML Element:Input FileUpload
Input FileUpload disabled Property - Find out if a FileUpload button is disabled
<!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 w w . j a v a 2 s .c o m document.getElementById("myFile").disabled = true; var v = document.getElementById("myFile").disabled; console.log(v); } function enableBtn() { document.getElementById("myFile").disabled = false; var v = document.getElementById("myFile").disabled; console.log(v); } </script> </body> </html>