案例:Bootstrap案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <meta charset="utf-8"> 
5
    <title>Bootstrap 实例 - 按钮(Button)插件加载状态</title>
6
    <link rel="stylesheet" href="/css/bootstrap/bootstrap3.3.7.min.css">
7
    <script src="/js/bootstrap/jquery.min.js"></script>
8
    <script src="/js/bootstrap/bootstrap3.3.7.min.js"></script>
9
</head>
10
<body>
11
12
<button id="fat-btn" class="btn btn-primary" data-loading-text="Loading..." 
13
    type="button"> 加载状态
14
</button>
15
<script>
16
    $(function() {
17
        $(".btn").click(function(){
18
            $(this).button('loading').delay(1000).queue(function() {
19
            // $(this).button('reset');
20
            // $(this).dequeue(); 
21
            });
22
        });
23
    });  
24
</script>

 运行结果 
 北美留学生论坛