zoukankan      html  css  js  c++  java
  • 【bootstrap】bootstrap可关闭警告框

    bootstrap可关闭警告框

    来源

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4     <meta charset="utf-8"> 
     5     <title>Bootstrap 实例 - 警告框(Alert)插件事件</title>
     6     <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
     7     <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
     8     <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
     9 </head>
    10 <body>
    11 
    12 <div id="myAlert" class="alert alert-success">
    13     <a href="#" class="close" data-dismiss="alert">&times;</a>
    14     <strong>成功!</strong>结果是成功的。
    15 </div>
    16 <script type="text/javascript">
    17 $(function(){
    18     $("#myAlert").bind('closed.bs.alert', function () {
    19         alert("警告消息框被关闭。");
    20     });
    21 });
    22 </script>  
    23 
    24 </body>
    25 </html>

     警告框都关闭:

    1 <script type="text/javascript">
    2 $(function(){
    3     $(".close").click(function(){
    4         $(".alert").alert('close');
    5     });
    6 });  
    7 </script>
  • 相关阅读:
    分解质因数
    大素数测试和分解质因数
    快速幂
    欧拉函数
    素数
    gcd,lcm,ext_gcd,inv
    凸包问题 poj 2187
    map的 简单用法
    判断线段是否在园内
    2-sat 问题
  • 原文地址:https://www.cnblogs.com/carsonwuu/p/7584318.html
Copyright © 2011-2022 走看看