Below is a testing code:
1. click the "change COL color", you will see the 2nd COL is red.
2. click the "change Row color", you will see the 2nd Row is blue, the lower right cell which was the red now changed to blue.
3. click the "change COL color" again, expecting to see the lower right cell changed back to red, but it keeps the blue color, can not be changed.
4. click the "change Row color back" , the 2nd row is changed to white color, click again "change COL color" , expecting to see the lower right cell changed to red, but again, nothing happens.
So the conclusion here is:
as soon as a row color change happens, col color change is not available, WHY? a bug ? or a feature?
This happens on both IE6 and Mozila2.
<html>
<head>
<title></title>
<script type="text/javascript">
function changeRow(){
document.getEle mentById("r2"). style.backgroun dColor="blue";
}
function changeRowBack() {
document.getEle mentById("r2"). style.backgroun dColor="white";
}
function changeCol(){
document.getEle mentById("c2"). style.backgroun dColor="red";
}
</script>
<style type="text/css">
</style>
</head>
<body>
<table border=1 width=200>
<col id="c1"></col><col id="c2"></col>
<tr id="r1"><td>1</td><td>2</td></tr>
<tr id="r2"><td>3</td><td>4</td></tr>
</table>
<p> <a href="" onclick="change Row(); return false;" >Change Row Color</a>
<p> <a href="" onclick="change RowBack(); return false;" >Change Row Color Back</a>
<p> <a href="" onclick="change Col(); return false;">Change Col Color</a>
</body>
</html>
1. click the "change COL color", you will see the 2nd COL is red.
2. click the "change Row color", you will see the 2nd Row is blue, the lower right cell which was the red now changed to blue.
3. click the "change COL color" again, expecting to see the lower right cell changed back to red, but it keeps the blue color, can not be changed.
4. click the "change Row color back" , the 2nd row is changed to white color, click again "change COL color" , expecting to see the lower right cell changed to red, but again, nothing happens.
So the conclusion here is:
as soon as a row color change happens, col color change is not available, WHY? a bug ? or a feature?
This happens on both IE6 and Mozila2.
<html>
<head>
<title></title>
<script type="text/javascript">
function changeRow(){
document.getEle mentById("r2"). style.backgroun dColor="blue";
}
function changeRowBack() {
document.getEle mentById("r2"). style.backgroun dColor="white";
}
function changeCol(){
document.getEle mentById("c2"). style.backgroun dColor="red";
}
</script>
<style type="text/css">
</style>
</head>
<body>
<table border=1 width=200>
<col id="c1"></col><col id="c2"></col>
<tr id="r1"><td>1</td><td>2</td></tr>
<tr id="r2"><td>3</td><td>4</td></tr>
</table>
<p> <a href="" onclick="change Row(); return false;" >Change Row Color</a>
<p> <a href="" onclick="change RowBack(); return false;" >Change Row Color Back</a>
<p> <a href="" onclick="change Col(); return false;">Change Col Color</a>
</body>
</html>
Comment