当我在弹出消息上单击取消时,它仍会删除记录,我不知道原因。
<tr>
<td class="recordCells">
<div align="center">
<a onclick="confirm('Are you sure you want to delete this record?')" href="deleterecord.php?ID=<?php echo $row_rsInventory['ID']; ?>">
<img src="../images/x.png" align="absmiddle">
</a>
</div>
</td>
</tr>
答案 0 :(得分:1)
您没有返回确认框的值:
<tr>
<td class="recordCells">
<div align="center">
<a onclick="return(confirm('Are you sure you want to delete this record?'))" href="deleterecord.php?ID=<?php echo $row_rsInventory['ID']; ?>">
<img src="../images/x.png" align="absmiddle">
</a>
</div>
</td>
</tr>
答案 1 :(得分:-2)
实际上存在&#34; href = deleterecord.php文件&#34;在锚标记中,所以你可以使用类似的代码:
uninitialized constant Minitest::Mock
Html代码: -
Test::Token.expects(:retrieve).with(token).returns(token)
或者你可以发给我一部分代码&#34; mohit.tiwari@techinfini.com"我会以适当的方式制作它。