首页 新闻 赞助 找找看

ajax点击停止不能正确的弹出信息框

0
[已关闭问题] 关闭于 2017-02-25 10:31
// 停止按钮
  $("#CrawlerTable").delegate(".c-stop","click",function(){
    var stopId=$(this).parents("tr").attr("id");
    // $(this).parents("tr").children("td:eq(3)").text("STOP");
    $.ajax({
      type: "POST",
      xhrFields: {
          withCredentials: true
      },
      crossDomain: true,
      url:dataUrl+"/SpyderPlatform/spyderInfo/stop",
      dataType: "json",
      data:{
        id:stopId
      },
      success:function(data){
        if(data.isSuccess){
          alert("停止成功");
          window.location.reload();
        }else{
          alert("已经停止或者停止失败");
        }
      }
    })
  })

当我点击停止按钮的时候,每次都是弹出已经停止或者停止失败,但是后台的确收到了data,我这里的if函数是哪里写的不对吗

Yhspehy的主页 Yhspehy | 菜鸟二级 | 园豆:232
提问于:2017-02-25 09:27
< >
分享
所有回答(1)
0

已经找到问题0.0

Yhspehy | 园豆:232 (菜鸟二级) | 2017-02-25 10:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册