How to set the index for a dynamically changing table?
问题 I have created a form where you can add or delete table rows using javascript and jQuery. I would like to know how I can obtain and set the index for each table row such that sequence is maintained even if I were to delete and element from the middle of the table. The table is of the form: <thead> <tr> <th>Index</th> <th>Name</th> <th>Property</th> <th>Edit/Delete</th> </tr> </thead> <tbody> <tr> <td class="index">Index goes here (1)</td> <td>NameOne</td> <td>PropOne</td> <td><span class=