Answers for "input file get file"

7

file input file types

<input type="file" accept=".gif,.jpg,.jpeg,.png,.doc,.docx">
Posted by: Guest on May-05-2020
-1

how to use input type file and show selected file on screen

updateList = function() {
  var input = document.getElementById('file');
  var output = document.getElementById('fileList');

  output.innerHTML = '<ul>';
  for (var i = 0; i < input.files.length; ++i) {
    output.innerHTML += '<li>' + input.files.item(i).name + '</li>';
  }
  output.innerHTML += '</ul>';
}
Posted by: Guest on December-01-2020
7

file input file types

<input type="file" accept=".gif,.jpg,.jpeg,.png,.doc,.docx">
Posted by: Guest on May-05-2020
-1

how to use input type file and show selected file on screen

updateList = function() {
  var input = document.getElementById('file');
  var output = document.getElementById('fileList');

  output.innerHTML = '<ul>';
  for (var i = 0; i < input.files.length; ++i) {
    output.innerHTML += '<li>' + input.files.item(i).name + '</li>';
  }
  output.innerHTML += '</ul>';
}
Posted by: Guest on December-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language