如何在ajax确认对话框中使用bootstrap [英] how to use bootstrap in ajax confirm dialog box

查看:75
本文介绍了如何在ajax确认对话框中使用bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,



我想知道我在下面的脚本中如何以及在哪里使用引导程序对话框。



PLZ帮助我。



< script> 

$(' body')。delegate( #delete click,function(){
var IdDelete = $( this )。attr( idd);

if (确认( 您确定要删除此类别)){
{
$ .ajax(
{
url: delt.php
类型: POST
数据:{
删除: 1
id:IdDelete
},
成功:function(){}

});
$( this )。parents( .del_cat)。animate({opacity: hide}, slow);
}
}
});

< / script>

解决方案

' body')。delegate( #delete 点击,function(){
var IdDelete =


this )。attr( idd);

if (confirm( 您确定要删除此类别)){
{


.ajax(
{
url: delt.php
类型:< span class =code-string> POST
data:{
删除: 1
id:IdDelete
},
成功:function(){}

});

Dear Experts,

I want to know how and where i use bootstrap dialog box in following script.

PLZ HELP ME.

<script>

  $('body').delegate("#delete","click",function(){
      var IdDelete = $(this).attr("idd");

      if(confirm("Are you sure to delete this category")){
      {
          $.ajax(
              {
                  url:"delt.php",
                  type:"POST",
                  data:{
                      deletes:1,
                      id:IdDelete
                  },
                  success:function(){}

              });
          $(this).parents(".del_cat").animate({opacity:"hide"},"slow");
      }
      }
  });

</script>

解决方案

('body').delegate("#delete","click",function(){ var IdDelete =


(this).attr("idd"); if(confirm("Are you sure to delete this category")){ {


.ajax( { url:"delt.php", type:"POST", data:{ deletes:1, id:IdDelete }, success:function(){} });


这篇关于如何在ajax确认对话框中使用bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆