All Components

Button / Basic usage

Basic Button

Disabled buttons

Disabled Primary Button Disabled Button

Buttons with icons

Filter Clear Filter Refresh

HTML5/JavaScript 源码

<!DOCTYPE html>
<html>
 <head> 
  <title>Basic usage</title> 
  <meta charset="utf-8"> 
  <link href="../content/shared/styles/examples-offline.css" rel="stylesheet"> 
  <link href="../../styles/kendo.common.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.rtl.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.default.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet"> 
  <script src="../../js/jquery.min.js"></script> 
  <script src="../../js/kendo.all.min.js"></script> 
  <script src="../content/shared/js/console.js"></script> 
  <script>
        
    </script> 
 </head> 
 <body> 
  <a class="offline-button" href="../index.html">Back</a> 
  <div id="example"> 
   <div class="demo-section k-content"> 
    <div> 
     <h4>Basic Button</h4> 
     <p> <button id="primaryTextButton" class="k-primary">Primary Button</button> <button id="textButton">Button</button> </p> 
    </div> 
    <div> 
     <h4>Disabled buttons</h4> 
     <p> <a id="primaryDisabledButton" class="k-primary">Disabled Primary Button</a> <a id="disabledButton">Disabled Button</a> </p> 
    </div> 
    <div> 
     <h4>Buttons with icons</h4> 
     <p> <a id="iconTextButton">Filter</a> <a id="kendoIconTextButton">Clear Filter</a> <em id="iconButton"><span class="k-sprite">Refresh</span></em> </p> 
    </div> 
   </div> 
   <script>
                $(document).ready(function () {
                    $("#primaryTextButton").kendoButton();

                    $("#textButton").kendoButton();

                    $("#primaryDisabledButton").kendoButton({
                        enable: false
                    });

                    $("#disabledButton").kendoButton({
                        enable: false
                    });

                    $("#iconTextButton").kendoButton({
                        spriteCssClass: "k-icon k-i-funnel"
                    });

                    $("#kendoIconTextButton").kendoButton({
                        icon: "funnel-clear"
                    });

                    $("#iconButton").kendoButton({
                        spriteCssClass: "k-icon k-i-refresh"
                    });               
                });
            </script> 
   <style>
                .demo-section p {
                    margin: 0 0 30px;
                    line-height: 50px;
                }
                .demo-section p .k-button {
                    margin: 0 10px 0 0;
                }
                .k-primary {
                    min-width: 150px;
                }                
            </style> 
  </div>   
 </body>
</html>