Input FileUpload multiple Property - Allow the user to select multiple files: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input FileUpload

Description

Input FileUpload multiple Property - Allow the user to select multiple files:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="#">
  Select files: <input type="file" id="myFile" name="files">
  <input type="submit">
</form>//w  w  w.  j ava  2 s  .com

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("myFile").multiple = true;
    document.getElementById("demo").innerHTML = "The file upload button now accept multiple values.";
}
</script>

</body>
</html>

Related Tutorials