现在在本节中写下
$(document).ready(function(){ $(".delete_class").click(function(){ var del_id = $(this).attr('id'); $.ajax({ type:'POST', url:'delete_page.php', data:'delete_id='+del_id, success:function(data) { if(data) { // DO SOMETHING } else { // DO SOMETHING } } }); });});
现在在“ delete_page.php”页面中执行此 *** 作
$id = $_POST['delete_id'];$query = "delete from TABLE NAME where ID = $id";
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)