Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

i am using this code for upload files to a server(in html):

    <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
    <label>upload file<input type="file" name="file" id="file" /></label>
    <label><input type="submit" name="button" id="button" value="Submit" /></label></form>

It's open file browser and let me select a file,and when i press on Submit the file is sent to my server.

i wonder if there is a way to make multiple file select.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
109 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use the multiple attribute for that, like this:

<input type="file" multiple />

To select multiple files you need to press the Ctrl key and click on the files you want to add.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...