How to set delete confirmation in php

coldplay.xixi
Release: 2023-03-04 13:26:01
Original
2819 people have browsed it

php method to set deletion confirmation: first open the code; then add the relevant code, the code is [Delete].

How to set delete confirmation in php

php method to set deletion confirmation:

First method:

<a href="javascript:if(confirm(&#39;确认删除吗?&#39;))window.location=&#39;del.asp&#39;">删除</a>
Copy after login

Second Type:

<script language="javascript">
<!--
function del_sure(){
var gnl=confirm("你真的确定要删除吗?");
if (gnl==true){
return true;
}
else{
return false;
}
}
--->
</script>
//调用
<a href="del.asp?id=<%=rs("id")%>" onclick="javascript:del_sure()">删除</a>
Copy after login

The third type:

<script language="javascript">
function confirmDel(str){
return confirm(str);
}
</script>
 
<a href="delete.asp" onclick="return confirmDel(&#39;确定要删除吗&#39;)">删除</a>
Copy after login

Related learning recommendations: php programming (video)

The above is the detailed content of How to set delete confirmation in php. For more information, please follow other related articles on 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