Change String value by input value - Javascript jQuery

Javascript examples for jQuery:String

Description

Change String value by input value

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.9.1.js"></script> 
      <script type="text/javascript">
    $(function(){//from   w w  w  . j  a  v a2s .  c o  m
var chk_check = 123
var chk_val_2 = $('#txt_rename' + chk_check).val();
console.log(chk_val_2);
    });

      </script> 
   </head> 
   <body> 
      <input id="txt_rename123" type="text" value="aaa&amp;#60;">  
   </body>
</html>

Related Tutorials