ما قصد داریم این پروژهٔ متنباز را در دسترس همهٔ مردم در سرتاسر دنیا قرار دهیم.
به ترجمهٔ محتوای این آموزش به زبان خودتان کمک کنید/a>.
Write the code to insert <li>2</li><li>3</li> between two <li> here:
<li>2</li><li>3</li>
<li>
<ul id="ul"> <li id="one">1</li> <li id="two">4</li> </ul>
When we need to insert a piece of HTML somewhere, insertAdjacentHTML is the best fit.
insertAdjacentHTML
The solution:
one.insertAdjacentHTML('afterend', '<li>2</li><li>3</li>');