<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.51sjk.com/Upload/Articles/1/0/330/330147_20220921170532358.jpg" dir="ltr"> <head> <title>input file upload multiple files</title> </head> <body> <input type="file" multiple="" name="filesToUpload" id="filesToUpload" onchange="makeFileList();"> <p> <strong>Files You Selected:</strong> </p> <ul id="fileList"><li>No Files Selected</li></ul> <script type="text/javascript"> function makeFileList(){ var input = document.getElementById("filesToUpload"); var ul = document.getElementById("fileList"); while (ul.hasChildNodes()){ ul.removeChild(ul.firstChild); } for(var i = 0; i < input.files.length; i++){ var li = document.createElement("li"); li.innerHTML = input.files[i].name; ul.appendChild(li); } if(!ul.hasChildNodes()){ var li = document.createElement("li"); li.innerHTML = "No files selected."; ul.appendChild(li); } } </script> </body> </html>
XHTMT|
HTML5|
CSS|
HTML DOM|
jQuery|
JSON|
AJAX|
LESS|
HTML|
Bootstrap|
Foundation|
AngularJS|
Ember.js|
TypeScript|
AngularJS2|
React|
jQuery UI|
jQuery EasyUI|
Node.js|
Highcharts|
Echarts|
Vue.js|
CoffeeScript|
Ext.js|
Meteor|
SASS|
Omi|
Markdown|
前端开发规范|
浏览器|
webpack|
JavaScript|
CSS3|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....