我想創建一個表,當一個特定的單元格被徘徊時,我希望所有的表都是不可見的。 這裏是我的簡單的代碼:隱藏所有表時td被徘徊
<!DOCTYPE html>
<html>
<head>
<style>
h4:hover
{
visibility:collapse;
}
table
{
visibility:visible;
}
#vis {background:#008500; color:#fff;}
td#vis:hover{
table.style.visibility:"collapse";
}
</style>
</head>
<body>
<p>
Each table starts with a table tag.
Each table row starts with a tr tag.
Each table data starts with a td tag.
</p>
<h4>Two rows and three columns:</h4>
<table border="1">
<tr>
<td id="vis">100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</table>
</body>
</html>
它不工作,實際上我不知道有什麼在td#vis:hover
部分包括。 我希望有人能夠幫助並儘快回覆。
*幫助和很快回復*肯定你有一個老闆 –
你的JavaScript代碼在哪裏?請儘快發佈 – eggward
'table.style.visibility:「collapse」;'不是一個有效的css stmt ....你需要使用javascript的那個 –