Excel數(shù)字格式改為日期格式的步驟
850
2023-11-15
彈出模態(tài)框modal的實現(xiàn)方法及實例
一個簡單的點擊列表修改按鈕,彈出bootstrap模態(tài)框,修改狀態(tài)傳到后臺php
<a data-toggle=" rel="external nofollow" rel="external nofollow" modal" data-target="#myModal" class="btn btn-success btn-sm edit">修改</a> < <a data-toggle=" rel="external nofollow" rel="external nofollow" modal" data-target="#myModal" class="btn btn-danger btn-xs" onclick="return confirm('刪除后無法恢復(fù),確定要刪除嗎')">刪除</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"> × </button> <h4 class="modal-title" id="myModalLabel"> 請修改回訪狀態(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="http://www.gimoo.net/t/1712/{{ url('subscribe/list') }}" rel="external nofollow" ; } } }); });
如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
#免責(zé)聲明#
本站[綠夏技術(shù)導(dǎo)航]提供的一切軟件、教程和內(nèi)容信息僅限用于學(xué)習(xí)和研究目的;不得將上述內(nèi)容用于商業(yè)或者非法用途,否則,一切后果請用戶自負。本站信息來自網(wǎng)絡(luò)收集整理,版權(quán)爭議與本站無關(guān)。您必須在下載后的24個小時之內(nèi),從您的電腦或手機中徹底刪除上述內(nèi)容。如果您喜歡該程序或內(nèi)容,請支持正版,購買注冊,得到更好的正版服務(wù)。我們非常重視版權(quán)問題,如有侵權(quán)請郵件[admin@lxwl520.com]與我們聯(lián)系進行刪除處理。敬請諒解!