Return integer for p element - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:jQuery Method Example


Return integer for p element

Demo Code

ResultView the demo in separate window

      <title>SO - 21742523</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src=""></script> 
      <script type="text/javascript">
    $(window).load(function(){/*from  w  w  w  .ja v  a  2 s .co  m*/
var DA1 = parseInt($("#DA1").text(), 10);

       h1 class="text-center"&gt; 
      <p id="DA1">34</p>   

Related Tutorials