动态删除row() [英] delete row() dynamically

查看:109
本文介绍了动态删除row()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


我可以使用DOM动态地向我的HTML表添加输入行,但是我无法删除所选行。实际上,每一行都包含一个删除按钮。因此,用户选择要删除的行,单击所选行要删除的删除按钮。

我的问题是(如果我删除第一行,则说未定义并更改值为0)请检查我的程序。

Hi!

I can add rows with inputs to my HTML table dynamically using DOM, but I cannot remove selected rows. In fact, every row contains a Delete button. So, user selects the rows to remove, clicks the delete button selected row wants to delete.

My problem is(If i delete the first row, its say undefined and change the value is 0) pls check my program.

展开 | 选择 | Wrap | 行号

推荐答案

您有以下事件:
You have the following events:
展开 | 选择 | 换行 | 行号


嗨!

Hi!

展开 | 选择 | Wrap | 行号


您能告诉我生成的HTML代码。 />
如果有外部JS链接,那么也发布它。

你有表头。并且您想要删除除表头之外的所有行。

Can you show me the generated HTML code.
If there is an external JS link then post it also.
You are having table headers. And you want to delete all the rows except table headers.

展开 | 选择 | Wrap | 行号


这篇关于动态删除row()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆