JSFiddle - React, Tailwind, and code Playground

by kien16

HTML

<script>
function convert() {
    input = document.getElementById('input');
    // how to remove
    alert('how to remove');
}
function check() {
    input = document.getElementById('input');
    for (i = 0; i < input.files.length; i++) {
        alert(input.files[i].name);
    }
}
</script>
<div id='upload'>
    <input id='input' type="file" value="" name="upload[]" multiple >
    <input type="button" value="Remove First" onclick="convert()">
    <input type="button" value="Check" onclick="check()">
</div>