Home > Web Front-end > JS Tutorial > body text

Summary of javaScript deletion confirmation implementation methods_javascript skills

PHP中文网
Release: 2016-05-16 18:38:29
Original
1064 people have browsed it

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>
Copy after login

The second method: the principle is the same as above.
JavaScript delete confirmation box

Delete

The third type: mainly used Confirmation prompt for batch deletion




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:
Delete
Second type:

//Call
" onclick="javascript:del_sure()">Delete
Third type:

Delete

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!