หนึ่ง,
คัดลอกรหัสรหัสดังนี้:
<script>
ฟังก์ชั่น del () {
if (ยืนยัน ("ยืนยันเพื่อลบ")) {
การแจ้งเตือน ("ใช่");
-
อื่น {
การแจ้งเตือน ("ไม่")
กลับ;
-
-
</script>
<html>
<อินพุต type = "button" value = "del" onclick = "del ();">
</html>
สอง,
คัดลอกรหัสรหัสดังนี้:
<a href = '/console/oneyear.action? id = <s: ค่าคุณสมบัติ = "id"/>'> แก้ไข </a> | <a href = 'JavaScript: delmonthMessage ("<s: property =" twoid " />") 'onclick = "return convent (' ยืนยันเพื่อลบบันทึกนี้? ')"> ลบ </a>
สาม,
คัดลอกรหัสรหัสดังนี้:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" />
<title> js ยืนยันการลบกล่องโต้ตอบรูปภาพ Lazy Image </title>
</head>
<body>
<p>
<ภาษาสคริปต์ = "JavaScript">
ฟังก์ชั่น delcfm () {
ถ้า (! ยืนยัน ("ยืนยันว่าลบ?")) {
window.event.returnvalue = false;
-
-
</script>
<a href = "http://www.lanrentuku.com/" onclick = "delcfm ()"> ลบ </a> </p>
<p> คำอธิบายรหัส: หลังจากคลิกที่ไฮเปอร์ลิงก์ที่ถูกลบฟังก์ชัน DelCFM () จะถูกดำเนินการในกล่องโต้ตอบถ้าคุณคลิก "ตกลง" ฟังก์ชั่นจะส่งคืนค่าจริง ในแท็ก <a> หน้าเว็บที่ถูกดำเนินการเพื่อลบ </p>
<p> สำหรับรหัสเพิ่มเติมกรุณาเยี่ยมชม: <a href = "http://www.lanrentuku.com" target = "_ blank"> แกลเลอรี่ขี้เกียจ </a> </p>
</body>
</html>