
新学js 有个作业 其他的我都会 就是那个删除记录我搞不懂 求大神教教
<tableborder="1px"cellspacing="0px"cellpadding="55"id="table"><tr><th>编号</th><th>姓名</...
<table border="1px" cellspacing="0px" cellpadding="55" id="table">
<tr>
<th>编号</th>
<th>姓名</th>
<th>性别</th>
<th>操作</th>
</tr>
<tr>
<th>1</th>
<th>张三</th>
<th>女</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
<tr>
<th>2</th>
<th>李四</th>
<th>女</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
<tr>
<th>3</th>
<th>王五</th>
<th>男</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
</table> remove函数应该怎么写呢 展开
<tr>
<th>编号</th>
<th>姓名</th>
<th>性别</th>
<th>操作</th>
</tr>
<tr>
<th>1</th>
<th>张三</th>
<th>女</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
<tr>
<th>2</th>
<th>李四</th>
<th>女</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
<tr>
<th>3</th>
<th>王五</th>
<th>男</th>
<th><a href="javascript:void(0);" onclick="remove()">删除</a></th>
</tr>
</table> remove函数应该怎么写呢 展开
展开全部
有一个隐藏属性,并且隐藏后不占位置,鼠标点击后隐藏就等于删除了
更多追问追答
追问
原谅我没看懂什么意思😥
就是不知道怎么删 用removechild的话就不知道是删第几个孩子
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询