html - Delete last row of table in nested div -


i want delete last row.

i have dive within div , has table , many rows.

i wanted delete last row of table. unable iterate last tr.

  <div class="span15" id="murworksheetpage2">                 <div class="span8">                     <table>                         <tr>                             <td class="col1">                                 @html.displaynamefor(model => model.medicineuseno) @html.textboxfor(model => model.medicineuseno, new { id = "txtmedicineuseno", style = "width:20px" })                              </td>                             <td class="col2">@html.displaynamefor(model => model.medicineprescribed) @html.textboxfor(model => model.medicineprescribed, new { id = "txtmedicineprescribed" })</td>                         </tr>                         <tr>                             <td class="col1" colspan="2">                                 @html.displaynamefor(model => model.otc)  @html.textboxfor(model => model.otc, new { id = "txtotc" })                              </td>                         </tr>  </table>                 </div>             </div> 

not tested, should work.

$('#murworksheetpage2 div table :last').remove(); 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -