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' }

10th Feb 2020, 6:54 PM
Emiliano0308
Emiliano0308 - avatar
2 odpowiedzi
0
Please provide link to your project
10th Feb 2020, 8:37 PM
Gabriel Ilie
Gabriel Ilie - avatar
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
10th Feb 2020, 11:10 PM
Emiliano0308
Emiliano0308 - avatar