I kind of hate doing this to Philip, but...
Code:
function showHide()
{
document.getElementById("div1").style.display =
document.getElementById("chk1").checked ? "block" : "none";
}
[Actually, I enjoy it tremendously, but sadists aren't supposed to admit they are.]
It does occur to me that he said "rows", which I take to mean <tr> rows in a <table>. And if there is more than one, they you'd need to repeat the code for each one:
Code:
function showHide()
{
var showhide = document.getElementById("chk1").checked ? "block" : "none";
document.getElementById("row1").style.display = showhide;
document.getElementById("row2").style.display = showhide;
document.getElementById("row3").style.display = showhide;
}
Which assumes you have done
Code:
<table ...>
...
<tr id="row1">....</tr>
<tr id="row2">....</tr>
<tr id="row3">....</tr>
...
If it's more than a handful or rows, I'd run a loop of some kind.