0
Whats the problem with this code? I want to change the h1 (tituloCompleto) for the value of two inputs.
var tituloCompleto = document.querySelectorAll('.content').value; var nuevoTitulo = document.querySelector('.titulopersonalizado').value; var titulo = document.querySelector('.titulo').value; var fecha = document.querySelector('.fecha').value; var submit = document.querySelector('.enter'); submit.addEventListener('click', tituloViaje) function tituloViaje(){ tituloCompleto.replace(titulo + fecha) nuevoTitulo.style.display = 'block' titulo.style.display = 'none' fecha.style.display = 'none' submit.style.display = 'none' }
2 Respuestas
0
Please provide link to your project
0
i dont know how. but i need someone to explain me the code i need to do that. i want an h1 (html) to change its value for the one that the user puts in an input form