我想添加刪除確認到我的表單按鈕 可能的javascript使用?刪除html格式的確認
<script type="text/javascript">
function confirmDelete() {
return confirm("Are you sure you want to delete?");
}
</script>
這是目前在我的窗體內工作。
<input type="button" onclick="parent.location='<?php echo "delete.php?id=" . $people['id'] ?>'" value='Delete'>
如何將javascript集成到onclick事件中?無論使用上述JavaScript或任何其他方式可能會更好
類似:HTTP ://stackoverflow.com/questions/9139075/confirm-message-before-delete – 2016-05-10 09:21:26