thinkphp---ajax实现删除

时间:2023-01-16 20:52:37
 $(document).ready(function(){
$("a[data]").click(function(){
var data = $(this).attr('data');
$.ajax({
url:"{:U('Index/article_delete')}",
data:"article_id="+data,
type:'post',
cache:false,
beforeSend:function(){
return confirm("确定删除?");
},
success:function(){
window.location.reload();
}
});
})
})