Add 2 variables in Javascript - Javascript jQuery

Javascript examples for jQuery:Variable

Description

Add 2 variables in 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.6.3.js"></script> 
      <script type="text/javascript">
$(document).ready(function() {

  var seconds = 1100;// www .  j av  a2 s  .co  m
  var time = 300;
  var newV = seconds + time;
  $('.show').html(newV);

});

      </script> 
   </head> 
   <body> 
      <div class="show"> 
      </div>  
   </body>
</html>

Related Tutorials