Answers for "how to use span tag in javascript"

4

set value in span using javascript

//set value in span using jquery
$("#idname").text("your value");

//set value in span using Javascript
document.getElementById("idname").textContent="Your value";
document.getElementById("message").innerHTML="your value";
Posted by: Guest on September-14-2021
1

javascript span style

//an example of an "out of context" way to change color of a text:
<span style="color: green"></span>
Posted by: Guest on May-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language