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 = utf-8" />
<title> konfirmasi apakah akan menghapus </iteme>
<type skrip = "Teks/JavaScript">
fungsi del () {
if (! confirm ("konfirmasi untuk menghapus?")) {
window.event.ReturnValue = false;
}
}
</script>
</head>
<body>
<a href = "http://www.baidu.com" onclick = "return del ()"> delete </a>
</body>
</html>