Home > Back-end >  JavaScript to implement dynamic to add, delete a line form
JavaScript to implement dynamic to add, delete a line form

Time:09-24

Style and HTML, and JavaScript code

Rendering the following

Strives for the JS code

CodePudding user response:

See the
jquery wordshttps://blog.csdn.net/hemeinvyiqiluoben/article/details/79790343

CodePudding user response:

Add the line: $(" table tbody "). Append (' & lt; tr> 1 Data ');
Delete rows: $(this). The closest (" tr "). The remove ();
To delete a row: $(" table tbody tr: eq (I) "). The remove (); Which line I subscript, starting from 0,
JQuery form operation, you try, the baidu search a handful,
  • Related