How can i convert .outerHTML to .text()
<p>I want to convert <code>item.outerHTML</code> to <code>.text()</code>, Actually I want to convert the html to text, now what do I do ?</p><pre><br /><code>$(imgAttr).each(function(index,item) {<br /> var valImg = $(item).attr("alt");<br /> if (typeof valImg == typeof undefined || valImg == "") { <br /> $(".url-res").append(item.outerHTML.text());<br /> }<br /></code><br /></pre><p>});</p><br /><h2>Click here view more answers <a href="http://ift.tt/1Qdwu4X">http://ift.tt/1Qdwu4X</a></h2>
Nhận xét
Đăng nhận xét