Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
Write multiple times to a blob file js

I have a form with one dropdown list and I want when the user click on the save button to save the value of the selected option in a text file. The user can open the form several times and add others options. It should write the option in the same text file at the end of the previous data.

 <form>
    <div class="form-inline">
      <select name="option" id="data" class="form-control"></select>
    </div>
 </form>
                        
 <button type="button" onclick="saveToTextFile()" class="btn btnsecondary">Save</button>



            function saveToTextFile() {
            var x = document.getElementById("data").selectedIndex;
            var y = document.getElementsByTagName("option")[x].value;

            var blob = new Blob([y],
                    {type: "text/plain;charset=utf-8"});
            saveAs(blob, "static.txt");}

Any advice ? Thank you !

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda