0
Good afternoon, dear friends !
I’m starting programming in javascript!
I started with something simple !!
A file download routine , where the idea is, by choosing the file to download , after checking whether the file exists or not , with message !
My code got bizarre I know !! but it’s for those who want to help me !!
<html>
<section id="conteudo">
<select id="opcao">
<option>Selecione</option> <tr>
<option value="209901">JAN/2099</option>
<option value="202002">FEV/2020</option>
<option value="202003">MAR/2020</option>
<option value="202004">ABR/2020</option>
<option value="202005">MAI/2020</option>
<option value="202006">JUN/2020</option>
<option value="202007">JUL/2020</option>
<option value="202008">AGO/2020</option>
<option value="202009">SET/2020</option>
<option value="202010">OUT/2020</option>
<option value="202011">NOV/2020</option>
<option value="202012">DEZ/2020</option>
</select>
<button onclick="clickyClick()">Baixar Indice</button> <tbr>
<script type='text/javascript'>
function clickyClick() {
url = 'http://www.quarta.com.br/downloads/gfip/'+"TF" + document.getElementById("opcao").value+".zip"
<script url='http://www.quarta.com.br/downloads/gfip/'+"TF" + document.getElementById("opcao").value+".zip" onerror="alert('Indice não disponilizado');" onload="window.open(url, '_blank');" type="text/javascript" ></script>
</script>
</html>