ytg1120

$(\'.num1\').each(function(){
var _this=$(this);
_this.click(function(){
$(\'.mondify\').each(function(){
if(_this.attr(\'data-class\')==$(this).attr(\'data-id\')){
$(this).css({display:\'block\'}).siblings(\'.mondify\').css({display:\'none\'});
var soure=$(this).find(\'.soure\');
var num=$(this).find(\'.num\');
soure.unbind(\'click\');
soure.click(function(){
$.ajax({
async: false,
type: "GET",
url: "{:url(\'goods_num\')}",
data: {id:_this.attr(\'data-class\'),num2:num.val()},
dataType: "json",
success: function(data){
if(data.status==true){
_this.html(data.num)
$(\'.mondify\').css(\'display\',\'none\')
}
if(data.status==false){
alert(\'修改失败\');
};
}
})
});

}
})
})
})

$(\'.delete\').each(function(){
var _this=$(this);
_this.unbind(\'click\');
var id=_this.attr(\'data-id\');
_this.click(function(){
$.ajax({
async: false,
type: "GET",
url: "{:url(\'goodsDel\')}",
data: {id:id},
dataType: "json",
success: function(data){
if(data.status==true){
alert(\'删除成功\');
_this.parents(\'.order_list\').empty();
}
}
})
})
})

 

删除节点

分类:

技术点:

相关文章:

  • 2021-11-12
  • 2021-11-01
  • 2021-11-01
  • 2018-01-04
  • 2021-04-01
  • 2021-05-27
  • 2021-09-02
  • 2021-05-23
猜你喜欢
  • 2021-11-12
  • 2021-11-01
  • 2021-11-12
  • 2021-09-25
  • 2021-08-04
  • 2021-11-12
  • 2021-12-31
相关资源
相似解决方案