Javascript examples for jQuery Method and Property:jQuery Method Example
Return integer for p element
<html> <head> <title>SO - 21742523</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></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); console.log(DA1) }); </script> </head> <body> h1 class="text-center"> <p id="DA1">34</p> </body> </html>