Create a javascript src attribute with a value written in a form - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:val

Description

Create a javascript src attribute with a value written in a form

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.11.0.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from   w  w  w. j av  a2 s  . c  o m
  $('#name').keyup(function() {
    $('#display').html($(this).val());
  });
    });

      </script> 
   </head> 
   <body> 
      <input type="text" id="name"> 
      <a id="display"></a>  
   </body>
</html>

Related Tutorials