最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

彈出模態(tài)框modal的實(shí)現(xiàn)方法及實(shí)例

 更新時(shí)間:2017年09月19日 17:04:21   投稿:lqh  
這篇文章主要介紹了彈出模態(tài)框modal的實(shí)現(xiàn)方法及實(shí)例的相關(guān)資料,希望通過(guò)本文能幫助到大家,需要的朋友可以參考下

彈出模態(tài)框modal的實(shí)現(xiàn)方法及實(shí)例

一個(gè)簡(jiǎn)單的點(diǎn)擊列表修改按鈕,彈出bootstrap模態(tài)框,修改狀態(tài)傳到后臺(tái)php

 <a href="" data-toggle=" rel="external nofollow" rel="external nofollow" modal" data-target="#myModal" class="btn btn-success btn-sm edit">修改</a>
     <!-- <a href="" data-toggle=" rel="external nofollow" rel="external nofollow" modal" data-target="#myModal" class="btn btn-danger btn-xs" onclick="return confirm('刪除后無(wú)法恢復(fù),確定要?jiǎng)h除嗎')">刪除</a> -->
    </td>
  </tr>
  @endforeach
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
            &times;
          </button>
          <h4 class="modal-title" id="myModalLabel">
              請(qǐng)修改回訪狀態(tài)
          </h4>
        </div>
        <div class="modal-body ">
      <select class="form-control" id="select">
       <option>成功</option>
       <option>未聯(lián)系</option>
       <option>失敗</option>
      </select>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">關(guān)閉
          </button>
          <button type="button" class="btn btn-primary saveId">
            提交更改
          </button>
        </div>
      </div>
    </div>
  </div>
 var saveID;
   $('.table').on('click','.edit',function(){
    console.log($(this).parent().parent().attr('data-id'));
    saveID = $(this).parent().parent().attr('data-id');
   });
   $('.saveId').click(function(){
     console.log(111,saveID);
      var options = $("#select option:selected");
      var status = options.val();
      $.ajax({
          type: "POST",
          url: "/subscribe/edit",
          dataType:"json",
          data:{
           "saveID" :saveID,
           "status":status,
           "_token":"{{ csrf_token() }}",
          },
          success: function(data) {
           if (data.code == 200) {
             window.location.href="{{ url('subscribe/list') }}" rel="external nofollow" ;
           }
          }
        });
   });

如有疑問(wèn)請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論

辽中县| 甘泉县| 奈曼旗| 太湖县| 措勤县| 娱乐| 青田县| 芦山县| 聂荣县| 高邑县| 大洼县| 绥滨县| 繁昌县| 仪征市| 广州市| 翁牛特旗| 巴林左旗| 广西| 屏东市| 平乡县| 青龙| 错那县| 泾阳县| 右玉县| 大兴区| 库车县| 大同市| 绵阳市| 内黄县| 延长县| 榆社县| 德兴市| 都匀市| 郁南县| 盱眙县| 海晏县| 鹿邑县| 榆社县| 绩溪县| 常德市| 奉新县|