增加和删除Html节点方法:
增加和删除Html节点方法:
<input type="button" onclick="a()" value="add">
<input type="button" onclick="b()" value="del">
<div id=m></div>
<script>
i=0
function a()
{
o=document.createElement("DIV")
o.innerHTML="<a href=''>test"+i+"</a>"
document.all.m.appendChild(o)
i++
}
function b()
{
document.all.m.removeChild(document.all.m.firstChild)
}
</script>