deleting a row of table that cursor pointing to it.so can any one help me how to do this..?
deleting a row of table that cursor pointing to it
Collapse
X
-
Tags: None
-
you are aware that by merely pointing the cursor at a row it may delete more rows than you intend to delete (since when one row is deleted, the next row is placed under the cursor).
anyways, the core principle for deleting a row is quite simple.
Code:// evt - the event object received when the desired event is triggered var row = evt.target.closest('tr'); row.parentNode.removeChild(row); -
-
"not working" is not a useful error description. what is happening that shouldn’t (and vice versa)? what about the error console? have you checked using break points?
and as far as the example code is concerned, it does work (albeit not in IE).Comment
Comment