Remove first number from height variable using javascript - Javascript String Operation

Javascript examples for String Operation:String Remove

Description

Remove first number from height variable using javascript

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-1.8.3.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from   w ww .ja  v  a  2 s  .c  o m*/
var height = $("#divOne").height().toString();
height = height.substring(1,height.length);
console.log(height);
    });

      </script> 
 </head> 
 <body> 
  <div id="divOne" style="height: 115px"></div>  
 </body>
</html>

Related Tutorials