8
What’s the difference between text()
and html()
?
$("#div").html('<a href="example.html">Link</a><b>hello</b>');
vs
$("#div").text('<a href="example.html">Link</a><b>hello</b>');
Which is the best to use and under which conditions?
8
What’s the difference between text()
and html()
?
$("#div").html('<a href="example.html">Link</a><b>hello</b>');
vs
$("#div").text('<a href="example.html">Link</a><b>hello</b>');
Which is the best to use and under which conditions?
Browser other questions tagged javascript jquery
You are not signed in. Login or sign up in order to post.