I have an array with URLs from checked checkboxes, after this I need to download all checked files on click
array look like [url1,url2,url3]
my script works fine, collecting data from checkboxes and I can show it but I can't do anything to download this files
<script type="text/javascript">
function GetSelected() {
    //Create an Array.
    var selected = new Array();
    //.
    var tbl = document.getElementById("acf-group_62bea885d8d59");
    //Reference all the CheckBoxes in Table.
    var chks = tbl.getElementsByTagName("INPUT");
    // Loop and push the checked CheckBox value in Array.
    for (var i = 0; i < chks.length; i++) {
        if (chks[i].checked) {
            selected.push(chks[i].value);
        }
    }
    //Display the selected CheckBox values.
    if (selected.length > 0) {
        alert("Selected values: " + selected.join(","));
    }
};
</script>
I need to download selected file from ACF repeater field (file) in post.php For now I can only download only one file but I need to bulk download selected enter image description here
 
    