title: how to hide checkbox and checkbox text using javascript in web forms
body: <p>I am working on web forms and writing a piece of javascript to hide checkbox and its text but only checkbox is getting hidden Text is still showing the way it was showing earlier.</p>
  <p>Here is my view code</p>
  <pre class="lang-html prettyprint-override"><code>&lt;table style=&quot;width: 60%&quot;&gt;
       &lt;tr&gt;
          &lt;td class=&quot;td_150px&quot;&gt;
              &lt;asp:CheckBox ID=&quot;chkEnddate&quot; runat=&quot;server&quot; CssClass=&quot;label&quot; Text=&quot;End On&quot;
                                onclick=&quot;EndSchedule();&quot; TextAlign=&quot;Left&quot;/&gt;
           &lt;/td&gt;
  
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>So here is my javascript code
  on click of a radio button i am using below code to hide the checkbox and text but only checkbox is hidden not text.</p>
  <pre><code> var chkEnddate= document.getElementById(&quot;ctl00_ContentPlaceHolder1_chkEnddate&quot;);
      chkEnddate.style.display = &quot;none&quot;;
  </code></pre>
  <p>Can anybody help me to hide checkbox and it's text at the same time using javascript. Thanks in advance.</p>