title: How to enable/disable a text box on clicking a button
body: <p>For example my page has a text box which already has some value and the readonly option for it is "true" , when the edit button is clicked next to the text box , the editing option in text box is enabled. How do I implement enabling the textbox when i click on a button.
  </p>
  
  <pre><code>function func() {
      $("input:button[name='button1']").click(function() {
          $("#text11").val($(this).val()).attr("disabled", "disabled");
          if($(this).val() != "") { 
              $("#text11").attr("disabled", "").focus();
          } 
      });
  }
  </code></pre>
  
  
  
  <pre><code>&lt;input type="text" name="text11" readonly="readonly" value="Editing is disabled"&gt;
  &lt;input type="button" value="edit" name="button1"&gt;
  </code></pre>
  
  <p>which is when I click this button , the readonly option in textbox should be disabled.How do I do that ?</p>