The second method: the principle is the same as above.
JavaScript Delete Confirmation Box
<a href= "javascript:if (' Do you really want to delete it? ') location= ' jb51.php?id= ' > Delete </a>
The third type: the confirmation prompt that is mainly used for bulk deletion
<input name= "Submit" type= "Submit" class= "Inputedit" value= "delete" onclick= "{if confirm (' OK record? ') {this.document.formname.submit (); return true;} return false;} " >
<input name= "Buttons" type= "button" id= "OK" onclick= "{if" (' OK delete? ') {window.location= ' action.asp? Action=del&tablename=item&id=<%=id%> '; return true;} return false;} " value= "Delete Column"/>
The following are the other netizens sorted, very similar. It is generally through the pop-up confirmation button to determine whether to continue to enter the following delete page.
First type:
<a href= "javascript:if (Confirm (' Confirm deletion? ')) window.location= ' del.asp ' > Delete </a>
The second type:
<script language= "JavaScript" >
<!--
function Del_sure () {
var gnl=confirm ("Are you really sure you want to delete it?");
if (gnl==true) {
return true;
}
else{
return false;
}
}
--->
</script>
Call
<a href= "del.asp?id=<%=rs (" id ")%>" onclick= "Javascript:del_sure ()" > Delete </a>
The third type:
<script language= "JavaScript" >
function Confirmdel (str) {
return confirm (str);
}
</script>
<a href= "delete.asp" onclick= "return Confirmdel (' OK to delete ')" > Delete </a>