I try to use jQuery to modify the HTML template.
For example:
var d = '<div class="a"><div class="b"></div><div class="c"></div></div>';
var html = $(d).find(".b").html("BBBBB");
console.log(d); // I want to get the new html
In above, I want to get
'<div class="a"><div class="b">BBBBB</div><div class="c"></div></div>'
How can implement the case? Please suggest.
console.log(html)$('.b').html("BBBBB")dis a variable and not DOM element. So it has no .html() method on it. What you actually want to achieve?find. @Aditya