I have a CheckBox
<asp:CheckBox ID="CheckBox2" runat="server" Text="Type of Change"></asp:CheckBox>
and a funcion, that work correctly, however only the alert appears "Work" but the checkbox not It updates
function Checks() {
var value1 = "false"
if (value1 == "false") {
alert("Work");
$("CheckBox2").prop('checked', true);
} else {
alert("False");
}
}
When loading the page you can see the checkbox checked without any problem
$("CheckBox2").prop('checked', true);
function Checks() {
var value1 = "false"
if (value1 == "false") {
alert("Work");
} else {
alert("False");
}
}
I think the checkbox should be updated somehow when entering the if
Aucun commentaire:
Enregistrer un commentaire