diff --git a/curriculumsearch/src/main/resources/static/main.js b/curriculumsearch/src/main/resources/static/main.js index f16ce41..b2f3c1b 100644 --- a/curriculumsearch/src/main/resources/static/main.js +++ b/curriculumsearch/src/main/resources/static/main.js @@ -1,30 +1,48 @@ var cont_experiencia = 0; let cont_estudios = 0; let cont_tecnologia = 0; -function agregarFieldExpierncia(evt){ +const experiencias = []; +const estudios = []; +const tecnologias = []; +function agregarFieldExpierncia(){ + //recoger del form + const pairs = {}; + const formexp = document.querySelector("[name=experiencia-form]"); + const formData = new FormData(formexp); + for (const [name, value] of formData){ + pairs[name] = value + } + experiencias[cont_experiencia] = pairs; + formexp.reset(); + //imprimir lista actualizada + const div = document.querySelector("#experiencias") + const div1 = document.createElement('div'); + let content='