Home > Web Front-end > JS Tutorial > body text

Detailed explanation of the usage of bootstrap3-dialog-master modal box

巴扎黑
Release: 2017-08-23 14:07:23
Original
1859 people have browsed it

This article mainly introduces the use of bootstrap3-dialog-master modal box in detail, which has certain reference value. Interested friends can refer to

bootstrap3-dialog-master It is an efficient and flexible modal box. Here are the basic knowledge!

1. Source code address

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

2. Effect display

3. Sample code
Required js and css to be introduced


##

<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>
Copy after login

Initialization



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

js implementation code



<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>
Copy after login

The above is the detailed content of Detailed explanation of the usage of bootstrap3-dialog-master modal box. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!