Set span value using jquery and javascript
Solved:
Jquery Example:
you can set value two different function.
1- text();
2- html();
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
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 functionstext - 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
Post a Comment