Set span value using jquery and javascript

Solved:

Jquery Example:

you can set value two different function.
1- text();
2- html();

$("#submittername").text("testing");
$("#submittername").html("testing <b>1 2 3</b>");
Difference between text and html functions

text - you can set only value
html - you can set value with html code but html tags not necessary for set the value

JavaScript Example;

you can set value from innerHTML

document.getElementById("spanID").innerHTML.("testing");

Comments

Popular posts from this blog

Add Image through base64 on PDF in itextsharp

how to insert text and tags at the cursor CKEDITOR