JQuery change/switch text to input - Javascript jQuery

Javascript examples for jQuery:Form Text Input

Description

JQuery change/switch text to input

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-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
$(document).ready(function(){
    $("a").click(function(e){
        e.preventDefault();//from w ww .j  a  v a 2  s .co  m
        $(this).parent().replaceWith("<input />");
    });
});
    });

      </script> 
 </head> 
 <body> 
  <div>
    testing 
   <a href="#">test</a> 
  </div>  
 </body>
</html>

Related Tutorials