时间:2021-07-01 10:21:17 帮助过:116人阅读
- function del(id){ if(confirm('确认要删除此关键字吗?')){
- $.post('./keyword',{ op:'del',id:id },function(result){
- alert(result); //正常这个部分应该显示的是object:object,但现在显示的是一个字符串
- if( result.code != 0 ){
- alert("删除失败!");
- }else{
- location.reload();
- }
- });
- }}
- echo json_encode(array("code"=>0));exit;
$.post('./keyword',{ op:'del',id:id },function(result){...}, 'json');
- function del(id){ if(confirm('确认要删除此关键字吗?')){
- $.post('./keyword',{ op:'del',id:id },function(result){
- alert(result); //正常这个部分应该显示的是object:object,但现在显示的是一个字符串
- if( result.code != 0 ){
- alert("删除失败!");
- }else{
- location.reload();
- }
- },"json");
- }}