Method 1: It is quite helpful. The page can be opened only after confirmation. The principle is also clear. It is mainly used to confirm deletion of a single message.
<Script language = javascript>
Function del (){
Var msg = "are you sure you want to delete it? \ N please confirm! ";
If (confirm (msg) = true ){
Return true;
} Else {
Return false;
}
}
</SCRIPT>
Call method:
<A href = "del. php? Id = 123 "onclick =" javascript: return del () "> Delete </a>
Method 2: the principle is the same as above. Confirmation box for JavaScript Deletion
<A href = "javascript: if (confirm ('Are you sure you want to delete it? ') Location = 'jb51. php? Id = '"> Delete </a>
Third: Mainly used for confirmation of batch Deletion
<Input name = "Submit" type = "submit" class = "inputedit" value = "delete"
Onclick = "{if (confirm ('Are you sure you want to record? ')){
This.doc ument. formname. submit ();
Return true;} return false;
} ">
<Input name = "button" type = "button" ID = "OK" onclick = "{if (confirm ('Are you sure you want to delete it? ')){
Window. location = 'action. asp? Action = Del &
TableName = Item &
ID = <% = ID %> ';
Return true;
} Return false;} "value =" delete topic "/>
From neural Style Neural Networks