Use jQuery to refer value from within a div - Javascript jQuery

Javascript examples for jQuery:Number

Description

Use jQuery to refer value from within a div

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-2.1.3.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){// www  . j av a 2  s .  co m
parseFloat($("#redmine").html());
    });

      </script> 
   </head> 
   <body> 
      <div id="redmine">
         42
      </div>  
   </body>
</html>

Related Tutorials