Answers for "how to change data to a span using dom"

2

javacsript update text in span

document.getElementById("myspan").textContent="newtext";
Posted by: Guest on July-28-2020
0

js add a tag inside span

var span = document.getElementById("span"); 

var a = document.createElement('a');
        a.href = "http://domain.com";
        span.appendChild(a);
Posted by: Guest on April-08-2021

Code answers related to "how to change data to a span using dom"

Code answers related to "Javascript"

Browse Popular Code Answers by Language