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.
Here is my view code
<table style="width: 60%">
<tr>
<td class="td_150px">
<asp:CheckBox ID="chkEnddate" runat="server" CssClass="label" Text="End On"
onclick="EndSchedule();" TextAlign="Left"/>
</td>
</tr>
</table>
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.
var chkEnddate= document.getElementById("ctl00_ContentPlaceHolder1_chkEnddate");
chkEnddate.style.display = "none";
Can anybody help me to hide checkbox and it's text at the same time using javascript. Thanks in advance.