已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题?**添加详细信息并通过editing this post阐明问题。
5天前关闭。
社区在4天前审查了是否重新讨论此问题,并将其关闭:
原始关闭原因未解决
Improve this question
我有一个ID为example
的表
<table id="example">
<tr>
<td>Emil</td>
<td>Tobias</td>
<td>Linus</td>
</tr>
<tr>
<td>16</td>
<td>14</td>
<td>10</td>
</tr>
</table>
我想删除ID,如果没有发布。
if (isset($_POST['save']))
{
...
}
else
{
echo "
<script>
const box = document.getElementById('example');
console.log(box.getAttribute('id'));
box.removeAttribute('id');
</script>";
}
好像不能用,怎么办?
1条答案
按热度按时间cbjzeqam1#
请检查它是否适合您。