回复 3楼 桃夭小仙
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
<!--
function remove(){
var oUl=document.getElementById("u1");
var oli=document.getElementById("l1");
var oli1=document.getElementById("l2");
var oli2=document.getElementById("l3");
oli=oUl.removeChild(oli);
oli1=oUl.removeChild(oli1);
oli2=oUl.removeChild(oli2);
}
//-->
</script>
</head>
<body>
<ul
id="u1">
<li
id="l1">牛奶</li>
<li id="l2" >咖啡</li>
<li id="l3">奶茶</li>
</ul>
<p><input name="button" type="button" id="button" onclick=" remove();" value="删除" /></p>
</body>
</html>
那我要依次删除列表项要怎么写呢?您再给我指点指点哇