window.onload = function () { // Html elements const url_envia = document.querySelector('#url_form_fix'); const mail_envia = document.querySelector('#mail_form_fix'); const clave_envia = document.querySelector('#clave_form_fix'); const btn_envia = document.querySelector('#btn_form_fix'); console.log(url_envia.value + '-' + mail_envia.value + '-' + clave_envia.value); // list to render let fixlinkrecibido = []; // btn_envia button handler // btn_envia.addEventListener('click', () => { if (this.validacreate(url_envia.value,mail_envia.value, clave_envia.value) == true) { let data = { a: url_envia.value, b: mail_envia.value, c:clave_envia.value }; fetch('crearfixlink', { method: "POST", body: JSON.stringify(data) }) .then(response => response.json()) .then(data => { fixlinkrecibido = data; render(); }); } }); function render() { var x = document.getElementById("divvuelta"); if (x.style.display === "none") { x.style.display = "block"; } x.innerHTML = '