基本上,当用户点击删除按钮时,脚本必须确认用户是否要删除。我想传递一行的id。我正在使用 input type="image" 并且 onclick 会显示该框。如何将 $row_id['id] 传递给 js 脚本。
<script type="text/javascript">
function show_confirm()
{
var r=confirm("Do you want to delete");
if (r==true)
{
window.location = "delete.php";
//alert("You pressed OK!");
}
else
{
}
}
</script>
<input type="image" src='../images/delete.jpg' width='30px' height='30px' style="position:relative; top:0px;" onclick="show_confirm()">