1 <form action='' method='POST' enctype='multipart/form-data' style="display:none;">2 <input type="file" id="myfile" onchange="document.getElementById('upload_button').innerHTML = 'UPLOADING'; up();" multiple>3 </form>4 <button id="upload_button" onclick="document.getElementById('myfile').click(); ">UPLOAD</button>5 <progress id="myprogress" max=100 value=0 title="74%">74%</progress>6 7 <script type="text/javascript">8 function up() {9 var p = document.getElementById('myprogress');10 var v = parseInt(p.value)+1;11 p.value = v;12 if (v<100)13 setTimeout(up, 50);14 }15 16 17 </script>18 19 https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications20 21 22
Enlace
El enlace para compartir es: