Home >Web Front-end >JS Tutorial >Summary of javaScript deletion confirmation implementation methods_javascript skills
The first method: It is very easy to use. Only after confirmation can the download address page be opened. The principle is also relatively clear. Mainly used to confirm deletion of a single message
<SCRIPT LANGUAGE=javascript> function p_del() { var msg = "您真的确定要删除吗?\n\n请确认!"; if (confirm(msg)==true){ return true; }else{ return false; } } </SCRIPT> 调用方法: <a href="del.jsp?id=<%=id%>" onclick="javascript:return p_del()">删 除</a>
The second method: the principle is the same as above.
JavaScript delete confirmation box
3ff8a2412452f51d5d437bcdacc359c5Delete5db79b134e9f6b82c0b36e0489ee08ed
The third type: mainly used Confirmation prompt for batch deletion
f70ea736a27b3d20c85db676f1887ec7
826518b6d97645fc2b1bf740bb98a591';return
true;}return false;}" value="Delete column"
/>
The following is compiled by other netizens, they are similar. Generally, a confirmation button pops up to determine whether to continue to the deletion page below.
First type:
80dd60c31d22cd1c39a47e47581e3135Delete5db79b134e9f6b82c0b36e0489ee08ed
Second type:
1a24b17f85e15c83fc29b7760e40bfcb
a4419002aad241ff04db9d9fbd7800e4
2cacc6d41bbb37262a98f745aa00fbf0
//Call
432c49e0ec608f8c22fd70f4e352d0bf"
onclick="javascript:del_sure()">Delete5db79b134e9f6b82c0b36e0489ee08ed
Third type:
9ffa231059a0f9914c3752a68f668712
function confirmDel(str){
return confirm(str);
}
2cacc6d41bbb37262a98f745aa00fbf0
8a2e0be8304309ed6b4dbf2ac2a86f6bDelete5db79b134e9f6b82c0b36e0489ee08ed