Olman Sánchez

Generation

generate functionTue, 04 Jul 2023

que arrastre datos de una tabla y los rellenes en un formulario con solo escribir el ID

function getData(id){ var datos = getDataFromTable().filter(function(dato){ return dato.id === id })[0] document.getElementById('id').value = datos.id document.getElementById('name').value = datos.name document.getElementById('address').value = datos.address document.getElementById('phone').value = datos.phone document.getElementById('email').value = datos.email }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant