顯示具有 Bootstrap 標籤的文章。 顯示所有文章
顯示具有 Bootstrap 標籤的文章。 顯示所有文章

2024年4月5日 星期五

bootstrap modal submit form

 Should be pretty simple. Just give your form an id


Copy

<form id="the-form" method="POST" action="{{ route('sms.store') }}">

Give the submit button an id


Copy

<button id="the-submit" type="submit" class="btn btn-primary">Save changes</button>

Then use jquery (since you're using bootstrap) to submit the form when the submit button is clicked.


Copy

$(function() {

    $('#the-submit').on('click', function(e) {

        $('#the-form').submit();

    });

});



2017年3月28日 星期二

modal hide bootstrap no work

How to hide Bootstrap modal from javascript?
---
請參考來源內的一段用法:
-
$('.modal-backdrop').hide(); // for black background
$('body').removeClass('modal-open'); // For scroll run
$('#modal').modal('hide');


這樣就能將背景色清除.隱藏

2017年3月21日 星期二

aspnet site img src

HTML img and ASP.NET Image and relative paths
---
若切換到不同路徑 , 會造成無法對應到圖檔位置
明碼的寫法 : 
<img src="~/App_Themes/Default/images/two.gif" runat="server" />

但若採用了 ajax 又不可以加 ~/   ,不然又對應不到圖檔  (動態式) 

就這2個差異