ホームページ  >  記事  >  ウェブフロントエンド  >  bootstrap3-dialog-masterモーダルボックスの使い方の詳細説明

bootstrap3-dialog-masterモーダルボックスの使い方の詳細説明

巴扎黑
巴扎黑オリジナル
2017-08-23 14:07:231860ブラウズ

この記事では主に bootstrap3-dialog-master モーダル ボックスの使い方を詳しく紹介します。興味のある方は参考にしてください。

bootstrap3-dialog-master は効率的で柔軟なモーダル ボックスです。基礎!

1.ソースコードアドレス


https://github.com/nakupanda/bootstrap3-dialog

2.導入する必要があるサンプルコード

<link rel="stylesheet" type="text/css" href="css/bootstrap-dialog.css" rel="external nofollow" > 
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" rel="external nofollow" > 
    <script type="text/javascript" src="js/jquery-1.11.3.js"></script> 
    <script type="text/javascript" src="js/bootstrap.js"></script> 
    <script type="text/javascript" src="js/bootstrap-dialog.js"></script>

初期化


<button type="button" id="tm" class="btn btn-primary" style="margin: 100px;">
<span class="glyphicon glyphicon-remove" aria-hidden="true">
</span>点我</button>

js実装コード


<script > 
    $(function(){ 
           
      $(&#39;#tm&#39;).on(&#39;click&#39;,function(){ 
 
            BootstrapDialog.show({ 
              type : BootstrapDialog.TYPE_DANGER, 
              message: &#39;你确定要删除吗?&#39;, 
              size : BootstrapDialog.SIZE_NORMAL, 
              buttons: [{ 
              label: &#39;确定&#39;, 
              action: function(dialog) { 
              dialog.close(); 
              } 
              }, { 
              label: &#39;取消&#39;, 
              action: function(dialog) { 
              dialog.close(); 
              } 
              }] 
            }); 
        })  
     })  
</script>

以上がbootstrap3-dialog-masterモーダルボックスの使い方の詳細説明の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。