Get data from table cell ID - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

Get data from table cell ID

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
$(function(){//from  ww  w.j  a v a2s  .  co  m
   console.log($("#number").html());
});
    });

      </script> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td id="number">56.78</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials