<HEAD>
<SCRIPT>
function removeElementById()
{
var oChild=form1.children('txt1');
if (oChild != null)
{
form1.removeChild(oChild);
}
}
function removeElementByIndex()
{
var oChild=form1.children(0);
if (oChild != null)
{
form1.removeChild(oChild);
}
}
</SCRIPT>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="" id="form1" id="form1">
<input type="text" value="aa" id="txt1"/>
<input type="button" onclick="removeElementByIndex()" value="删除Byindex"/>
<input type="button" onclick="removeElementById()" value="删除ByID"/>
</FORM>
</BODY>
posted on 2006-04-03 14:41
汪杰 阅读(214)
评论(0) 编辑 收藏 引用 所属分类:
hengxing网站js