我正在使用此代码显示表格
<table>
<tr>
<th style="height: 25px">NAME</th>
<th style="height: 25px">EMAIL</th>
<th style="height: 25px">CELL NO</th>
<th style="height: 25px">CITY</th>
<th>Hide Candidate</th>
</tr>
</table>
<?php
while($data_set1 = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>{$data_set1['ename']}</td>";
echo "<td>{$data_set1['eemail']}</td>";
echo "<td>{$data_set1['ecell']}</td>";
echo "<td>{$data_set1['ecity']}</td>";
echo "<td><input type=\"checkbox\" name=\"hide_cand\" id=\"hide_cand\" onclick=\" return hideRow(this)\"/></td>";
\"/></td>";
echo "</tr>";
}
?>
并使用这个javascript我可以暂时隐藏表格行,当表格加载到页面上时如何永久隐藏它
function hideRow(checkbox)
{
if(confirm('This action can not be recovered, are you sure you want to HIDE this Candidate? '))
{
checkbox.parentNode.parentNode.style.display = "none";
return true;
}
return false;
}