Home  >  Article  >  Web Front-end  >  Three ways to use the javascript confirmation box_Basic knowledge

Three ways to use the javascript confirmation box_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:08:401465browse

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.

Copy code The code is as follows:


Calling method:

Copy code The code is as follows:

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

Copy code The code is as follows:

The third type: confirmation prompt mainly used for batch deletion

Copy code The code is as follows:

onclick="{if(confirm('Are you sure about the record?')){
this .document.formname.submit();
return true;}return false;
}">

Statement:
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