<div class="htmlarea"> <textarea id="runcode58843"> <ul id="ul1"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> <script> var ul = document.getElementById('ul1'); var lis = ul.getElementsByTagName('li'); var i = lis.length; while (i--) ul.appendChild(lis[i]); </script> </textarea><br><input onclick="runEx('runcode58843')" type="button" value="运行代码"> <input onclick="doCopy('runcode58843')" type="button" value="复制代码"> <input onclick="doSave(runcode58843)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>