Par exemple, si je HTML ul
liste commeComment obtenir la chaîne html d'une balise enfant et d'une balise parent en utilisant jquery?
<ul id="ulIdentificator">
<li id="li0"></li>
<li id="li1"></li>
<li id="li2"><label id="label1"></label></li>
</ul>
Si j'utilise jQuery comme ce
var htmlStr = $("#li2").html();
Le résultat sera que la chaîne qui contient balise label <LABEL id="label1"></LABEL></li>
je dois obtenir la chaîne Html qui contient ce <LI id="li2"><LABEL id="label1"></LABEL></LI>
La prochaine question de jquery après votre http://stackoverflow.com/questions/1917040/can-i-get-the-full-html-represenation-of-an-htmlelment-dom-object –