Append number to string - Javascript jQuery

Javascript examples for jQuery:String

Description

Append number to string

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.5.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from  w  w  w  .  java 2s . c o  m
$('input[type=button]').click( function() {
    test=20;
    s("this is a test test - <b>test</b> <b>est - test:  "+test+" for equities.");
});

function s(value1){
 console.log(value1)
}
    });

      </script> 
 </head> 
 <body> 
  <input type="button" value="test">  
 </body>
</html>

Related Tutorials