I am developing an asp.net web app in which I am using a span tag
<span id = "ptxtAgree" > <%: data.Agree %></span>
and I want to update the span text through javascript and in script I am writing
$("#ptxtAgree").text(msg);
If I am writing the empty span then its value is updated but by using this <%: %> it is not possible.
Sorry for poor English
regards
To change the html inside the span using jQuery you can use :
If you want to remove everything inside the span you can use:
Hope this helps 🙂