How to set deletion prompt in php: 1. In link form, the code is [echo "delete;】; 2. Button form, the code is [
##php How to set the deletion prompt:
1. Link format
Just change this line.echo "<a href = "delete2.php?id=$id">删除</a>;Copy after loginAdd to the link An onclick event occurred.echo "<a href = "delete2.php?id=$id" onclick="if(confirm('确实要删除此条记录吗?') " >删除</a>;Copy after login2. Button form
<button onclick="if(confirm('确实要删除此条记录吗?')) return submit(); else return false; " class="button_a" style="width:95;height:22" ;><img src="images/icon_21x21_del.gif" align="absmiddle" />删除</button>Copy after login3. Button link form
<button onClick="if(confirm('确实要删除此条记录吗?')) return location.href='delete2.php?phoneid=$phoneid';else return false;" class="button_a" style="width:50;height:22" ;> <img src="images/icon_del.gif" align="absmiddle">删除</button>Copy after login4 , input button method
<input class="button_a" onclick="if(confirm('确实要删除此条记录吗?')) return submit(); else return false;" type="submit" name="Submit" value="删除" >Copy after loginRelated learning recommendations:The above is the detailed content of How to set deletion prompt in php?. For more information, please follow other related articles on the PHP Chinese website!