xxxxxxxxxx
// Assuming there's a span element with id "mySpan" in the HTML
$("#mySpan").text("New text content");
xxxxxxxxxx
//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";