运行 ❯
获取您的
自己
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> Select files: <input type="file" id="myFile" name="files"> <input type="submit"> </form> <p>Click the "Try it" button to allow multiple values (files) for the file upload button.</p> <p>Try selecting more than one file when browsing for files before and after you have clicked on the "Try it" button. <strong>Tip:</strong> hold down CTRL or the SHIFT key while select, to select multiple files.</p> <button onclick="myFunction()">Try it</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>