Home > Web Front-end > JS Tutorial > How to delete rows in javascript

How to delete rows in javascript

藏色散人
Release: 2023-01-03 09:31:47
Original
5202 people have browsed it

How to implement deleting rows in javascript: first create a new html file; then enter the code "click(function () {$(this).parent().parent().remove" in the <script> tag ();});" is enough. </script>

How to delete rows in javascript

The operating environment of this article: Windows 7 system, JavaScript version 1.8.5, DELL G3 computer.

1. First, open the html editor, create a new html file, for example: index.html, and insert the required tables.

How to delete rows in javascript

2. Then enter the code in the <script> tag of index.html: <code>$('button').click(function () {$ (this).parent().parent().remove();});. </script>

How to delete rows in javascript

#3. Run the index.html page in the browser and click the delete button on line 1. Line 1 is indeed deleted, and the code is not in the form of a line number.

How to delete rows in javascript

[Recommended learning: js basic tutorial]

The above is the detailed content of How to delete rows in javascript. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template