欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery ajax中使用confirm,確認(rèn)是否刪除的簡單實(shí)例

 更新時(shí)間:2016年06月17日 10:59:53   投稿:jingxian  
下面小編就為大家?guī)硪黄猨Query ajax 中使用confirm ,確認(rèn)是否刪除的簡單實(shí)例。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧

jQuery ajax 中使用confirm ,確認(rèn)是否刪除按鈕 onclick="return confirm('確認(rèn)刪除?');"

<script type="text/javascript">
$(function(){
 
 
 $("#btnDelete").click(function(){
  //var user8ID = $.trim( $('#user8ID').val() );
  var statu = confirm("Are you sure to delete the current data?");
  if(!statu){
   return false;
  }
 var operation = '8IDdelete';
  $.ajax({
    type:'POST',
    url:'backendUserModuleMapping.php?stamp='+new Date().getTime(),
    data:'operation='+operation+'&'+$("form").eq(1).serialize(),
    success:function(msg){
      if(msg == 1){
       alert( 'Delete Successful!' );
       location.reload();
      }else{
       alert( 'Delete Failed!' );
      }      
    },
    error:function(){
      alert( 'Delete Failed!' );
    }
    
   });
  
 });
 
 });
</script>

以上就是小編為大家?guī)淼膉Query ajax中使用confirm,確認(rèn)是否刪除的簡單實(shí)例全部內(nèi)容了,希望大家多多支持腳本之家~

相關(guān)文章

最新評(píng)論