Berikut ini adalah syntax untuk konfirmasi hapus di PHP.
_______________________________________________
<script>
function confirmDelete(delUrl) {
if (confirm("Are you sure you want to delete")) {
document.location = delUrl;
}
}
</script>
<a href="javascript:confirmDelete('delete.page?id=1')">Delete</a>
_______________________________________________
Dan cara singkatnya seperi ini :
__________________________
<a href="delete.page?id=1" onclick="return confirm('Are you sure you want to delete?')">Delete</a>
Semoga bermanfaat :)
_______________________________________________
<script>
function confirmDelete(delUrl) {
if (confirm("Are you sure you want to delete")) {
document.location = delUrl;
}
}
</script>
<a href="javascript:confirmDelete('delete.page?id=1')">Delete</a>
_______________________________________________
Dan cara singkatnya seperi ini :
__________________________
<a href="delete.page?id=1" onclick="return confirm('Are you sure you want to delete?')">Delete</a>
Semoga bermanfaat :)
Konfirmasi Hapus
Reviewed by Syawaluddin Amin, S.Kom
on
Maret 23, 2013
Rating:
Tidak ada komentar: