Avatar of Whing Dela Cruz
Whing Dela Cruz
Flag for Anguilla

asked on 

Read text on Table

Hi experts, I need to change the html into value since the source "sTable7" is type text.  I have tried this tr.find('td:eq(1)').value; but not working.

<script>
$(function() {
  $(document ).on("click","#sTable7 button.iAddbutton",function() {
    let tr = $(this).closest('tr');
    let a = tr.find('td:eq(1)').html();
    let b = tr.find('td:eq(2)').html(); 
    
    alert(a);    
  });
});
</script>

Open in new window

ASPHTMLJavaScript

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon