Home  >  Article  >  Web Front-end  >  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.

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.

高洛峰
高洛峰Original
2016-12-17 14:14:402423browse

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>



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!

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