This is my code:
function habilitarsistemas() {
if (document.getElementById("ChkSistemas").checked)
document.getElementById("tabelasistemas").style.display = "block";
else
document.getElementById("tabelasistemas").style.display = "none";
}
It works fine with Firefox but it doesn't with IE and Chrome. Why?
jQuery solution.
function habilitarsistemas() {
if ($('#ChkSistemas').is(':checked')) {
$('#tabelasistemas').css({ display: 'block' });
}
else {
$('#tabelasistemas').css({ display: 'none' });
}
}