Bootstrap按钮方法

Bootstrap按钮方法:

<!DOCTYPE html>
<html>
<head>
   <title>Try v1.2 Bootstrap Online</title>
   <link href=/bootstrap/css/bootstrap.min.css rel=stylesheet>
   <script src=/scripts/jquery.min.js></script>
   <script src=/bootstrap/js/bootstrap.min.js></script>
</head>
<body>

<h2>Click on each of the buttons to see the effects of methods</h2>
<h4>Example to demonstrate .button('toggle') method</h4>

<div id = myButtons1 class = bs-example>
   <button type = button class = btn btn-primary>Primary</button>
</div>

<h4>Example to demonstrate  .button('loading') method</h4>

<div id = myButtons2 class = bs-example>
   <button type = button class = btn btn-primary data-loading-text = Loading...>
      Primary
   </button>
</div>

<h4>Example to demonstrate .button('reset') method</h4>

<div id = myButtons3 class = bs-example>
   <button type = button class = btn btn-primary data-loading-text = Loading...>
      Primary
   </button>
</div>

<h4>Example to demonstrate  .button(string) method</h4>

<button type = button class = btn btn-primary id = myButton4 
   data-complete-text = Loading finished>
   Click Me
</button>

<script type = text/javascript>
   $(function () {
      $(#myButtons1 .btn).click(function(){
         $(this).button('toggle');
      });
   });

   $(function() { 
      $(#myButtons2 .btn).click(function(){
         $(this).button('loading').delay(1000).queue(function() {
         });        
      });
   });   

   $(function() { 
      $(#myButtons3 .btn).click(function(){
         $(this).button('loading').delay(1000).queue(function() {
            $(this).button('reset');
         });        
      });
   });  

   $(function() { 
      $(#myButton4).click(function(){
         $(this).button('loading').delay(1000).queue(function() {
            $(this).button('complete');
         });        
      });
   }); 
</script> 

</body>
</html>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
Bootstrap选择表单控件 - <!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title>
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!DOCTYPE html> <html> <head> <title>Try v1.2 Bootstrap Online</title> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">