簡體   English   中英

在頁面刷新時阻止模式窗口

[英]Preventing modal window when the page is refreshing

我的網頁上有一個帶加載功能的模式窗口(引導程序4)。 我也有一個多頁的gridview。 當我打開網頁時,將顯示模態窗口,沒有問題。 但是,當我單擊gridview的下一頁時,頁面刷新,並且再次顯示模式窗口。 如何防止第二次顯示模式窗口。 提前致謝。

<script type="text/javascript">
$(window).on('load',function(){
    $('#myModal').modal('show');
});

$(window).on('load',function(){
     if(!sessionStorage.hasOwnProperty("isPopuped")){
        $('#myModal').modal('show');
        sessionStorage.setItem("isPopuped",true);
      }
    });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM