satu,
Salinan kode adalah sebagai berikut:
<script>
fungsi del () {
if (konfirmasi ("konfirmasi untuk menghapus")) {
peringatan ("ya");
}
kalau tidak{
Peringatan ("Tidak")
kembali;
}
}
</script>
<Html>
<input type = "tombol" value = "del" onclick = "del ();">
</html>
dua,
Salinan kode adalah sebagai berikut:
<a href = '/console/oneyear.action? id = <s: nilai properti = "id"/>'> Edit </a> | <a href = 'javascript: delmonthmessage ("<s: nilai properti =" TwoID " />") 'OnClick = "Return Confirm (' Konfirmasi untuk menghapus catatan ini? ')"> Hapus </a>
tiga,
Salinan kode adalah sebagai berikut:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transisi // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "konten-tipe" content = "text /html; charset = gb2312" />
<title> js konfirmasi dialog penghapusan galeri gambar-lazy </iteme>
</head>
<body>
<p>
<bahasa skrip = "javascript">
fungsi delcfm () {
if (! confirm ("konfirmasi untuk menghapus?")) {
window.event.ReturnValue = false;
}
}
</script>
<a href = "http://www.lanrentuku.com/" onclick = "delcfm ()"> hapus </a> </p>
<p> Deskripsi Kode: Setelah mengklik hyperlink yang dihapus, fungsi delcfm () akan dieksekusi. Dalam tag <a> Halaman yang dieksekusi untuk menghapus; jika Anda mengklik "Batal", fungsi akan mengembalikan nilai yang salah, dan tag <a> tidak akan ditransfer ke halaman yang dieksekusi untuk menghapus. </p>
<p> Untuk lebih banyak kode, silakan kunjungi: <a href = "http://www.lanrentuku.com" target = "_ blank"> Galeri Lazy </a> </p>
</body>
</html>