skip to Main Content

Html – CSS and JS: How to prevent "event.target.innerText" from deleting inside tag

For example, I have a tag like: <p><a href="mailto:[email protected]">[email protected]</a></p> When it runs through this: const repetitions = setInterval(x => { originalText = event.target.innerText; splitText = event.target.dataset.value.split(""); event.target.innerText = splitText.map((character, index) => { if (index < i) { return event.target.dataset.value[index]; }…

VIEW QUESTION

Html – Set input value with Javascript don't really set the value when I send the form

This is my code function updateName(nombreCampo, valor) { var campo = document.getElementsByName(nombreCampo)[0]; campo.value = valor; campo.dispatchEvent(new Event('input', { bubbles: true })); } function updateId(nombreCampo, valor) { var campo = document.getElementById(nombreCampo); campo.value = valor; campo.dispatchEvent(new Event('input', { bubbles: true })); }…

VIEW QUESTION
Back To Top
Search