how to upload multiple files more than 1 in html input tag type = "file"

 HOW TO SELECT MULTIPLE FILES IN HTML INPUT TAG



see in the image I selected more than 1 image by clicking on choose files button 

to code like this you have to add  attribute "multiple" in the HTML input tag like this 

<input type="file" multiple>

by writing code like this you can select multiple images for uploading files in HTML

HTML INPUT TYPES::

<input type="button">

<input type = "checkbox">

<input type = "color">

<input type = "date">

<input type = "datetime-local">

<input type = "file">

<input type = "email">

<input type = "hidden">

<input type = "image">

<input type = "month">

<input type = "number">

<input type = "password">

<input type = "radio">

<input type = "range">

<input type = "reset">

<input type = "search">

<input type = "tel">

<input type = "text">

<input type = "time">

<input type = "url">

<input type = "week">

<input type = "textarea">


the default value of input tag is type = "text"

attributes in input tag

checked
specifes that an input field should be preselected when the page loads only for checkbox and radio
disabled
it says that input field should be disabled
max
specifies the maximum value for an input field
maxlength
specifies the maximum number of character for an input field
min
specifies the minimum value for an input field
pattern
specifies the regular expression to check the input value
readonly
specifies that an input field is read only and cannot be changed
required
specifies that an input field is required
size
specifies the width of an input field
step
specifies the legal number intervals for an input field
value
specifies the dafault value for an input field
accept
sets the value of accept attribute
autofocus
sets or returns whether input field must automatically focused when page load
default value
sets the default value of input field
disabled
sets or returns whether the file upload button is disabled or not
files
returns a file list object that represents the file or files selected with the file upload button
form
returns a reference to the form that contains the file upload button
multiple
sets or return whether a user is allowed to select more than one file in the file upload button
name
sets the value of the name attribute of input field
required
alerts user if the input field is not filled
type
returns which type of form element is the input field
value
returns the path or name of the selected file
alt
specifies alternate text
autocomplete
sopecifies whether an input element has autocomplete enabled

url type is used to say user that you have to enter only URL address url - uniform resource locator

week type allows the user to select a week and a year

time type allows the user to select a time

tel type is used so as to say that input field should contain a telephone number

search type is used for search fields

range type allows user to select number within the range


these all types may vary in design based on the browser 


thanks for reading 

please subscribe my youtube channel @kssvinay

Comments

Popular posts from this blog