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

js pops up a confirmation message box to determine whether to delete. Before deleting, the user is prompted whether to delete. Click Yes to delete, click No to return.

高洛峰
Release: 2016-12-17 14:14:40
Original
2433 people have browsed it

The

confirm() method is used to display a dialog box with the specified message and OK and Cancel buttons.

If the user clicks the OK button, confirm() returns true. If the cancel button is clicked, confirm() returns false.

It will block all user input to the browser until the user clicks the OK button or the Cancel button to close the dialog box. When confirm() is called, execution of the JavaScript code is paused and the next statement is not executed until the user responds.

<BODY>  
<a href="xxoo.asp?id=<%=rs("id")%>" onclick="return confirm(&#39;确定将此记录删除?&#39;)">删除</a>  
</BODY>
Copy after login



More js pops up a confirmation message box to determine whether to delete. Before deleting, the user is prompted whether to delete, click yes to delete, click no to return to related articles. Please pay attention to the PHP Chinese website!

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