我使用这个代码,以显示表隐藏行永久表
<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我可以暂时隐藏表中的行,如何permanantly隐藏它,当正装表
页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;
}
你总是可以......在'while()'循环中不输出''?也许在行上设置一个'style =“display:none”'?你有没有想过这个? – Bojangles
它实际上可以被恢复,因为我可以通过开发人员工具或萤火虫编辑HTML元素 –
我想隐藏行只有当用户想要它,所以我不能使用style =“display:none” – raj