title: How to change field attribute : readonly and after change button to save
body: <p>I want to modify button.</p>
  
  <pre><code>&lt;label&gt;Title&lt;/label&gt; &lt;input type="text" name="title" value="${boardVO.title}" readonly="readonly"&gt;
  
  
  &lt;button type="button" onClick="change('asdasd')"
  class="btn btn-info"&gt;MODIFY&lt;/button&gt;
  </code></pre>
  
  <p>and script is</p>
  
  <pre><code>function change(target){
    if(target=='asdasd'){
      $("input[name='title']).removeAttr("readOnly");
  </code></pre>
  
  <p>if I first click 'modify', remove readOnly.
  and edit text 
  one more click 'modify' (second Click) text is saved.</p>
  
  <p>I was thinking about type changing.</p>
  
  <p>If change button type "button" -> "submit", maybe?</p>
  
  <p>if I am correct, then I don't know how to change button type in script</p>