html:
<ul id="box">
<li><img src="image/i1.png" alt=""></li>
<li><img src="image/i2.png" alt=""></li>
<li><img src="image/i3.png" alt=""></li>
</ul>
script:
var mybox = document.getElementsByTagName("li");
document.write(mybox[1].innerHTML);
image/i2.png will be displayed on the webpage,how to get the html string literally?
What i expect to get is the following string.
<li><img src="image/i2.png" alt=""></li>