title: how to remove text box value on check box unchecked?
body: <p>Hi i have two check boxes  PlanA AND AndroidApps and one textbox when i checked check box then text box enable  and when i unchecked thrn text dox disabled but problem is when tex box is enable and i write something in text box and then unchecked my checkbox then my textbox disabled but that text which i typed it does not delete and text box does not clear</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $('#main_box').on('change',function(e) {
          console.log("dfsd");
         $("#a2").prop("checked",this.checked);
       $("#emailid").prop("disabled", !$(this).is(':checked'));
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
                  &lt;input id="main_box"type="checkbox" name="PlanA" value="A"&gt;&lt;label for="PlanA"&gt;&lt;span style="font-weight:bold"&gt;PlanA&lt;/span&gt;&lt;/label&gt;&lt;br&gt;
                  &lt;input name="PlanA" type="hidden" value=0 /&gt;
  
  
                  &lt;input type="checkbox" name="AndroidApps" id="a2" value=1&gt;&lt;label for="AndroidApps"&gt;&lt;span style="font-weight:bold"&gt;AndroidApps&lt;/span&gt;&lt;/label&gt;&lt;br&gt;
                  &lt;input name="AndroidApps" type="hidden" value=0 /&gt;
  
  
                           &lt;input type="text" name="emailid"id="emailid"disabled="disabled" required size="45"  &gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can i achieve this</p>
  
  <p>Thanks in advance</p>