getting-started.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Getting started &middot; Bootstrap Table</title>
  6. <meta name="author" content="zhixin">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../src/bootstrap-table.css">
  10. <link rel="stylesheet" href="docs.css">
  11. <!--<link rel="stylesheet" href="//wenzhixin.net.cn/css/fork.css">-->
  12. <!--[if lt IE 9]>
  13. <script src="//wenzhixin.net.cn/js/html5shiv.js"></script>
  14. <script src="//wenzhixin.net.cn/js/respond.min.js"></script>
  15. <![endif]-->
  16. </head>
  17. <body>
  18. <a class="sr-only" href="#content">Skip to main content</a>
  19. <header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
  20. <div class="container">
  21. <button class="navbar-toggle" type="button" data-toggle="collapse"
  22. data-target=".bs-navbar-collapse">
  23. <span class="sr-only">Toggle navigation</span>
  24. <span class="icon-bar"></span>
  25. <span class="icon-bar"></span>
  26. <span class="icon-bar"></span>
  27. </button>
  28. <div class="navbar-header">
  29. <a class="navbar-brand" href="index.html">
  30. Bootstrap Table
  31. </a>
  32. </div>
  33. <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
  34. <ul class="nav navbar-nav">
  35. <li class="active">
  36. <a href="getting-started.html">Getting started</a>
  37. </li>
  38. <li>
  39. <a href="documentation.html">Documentation</a>
  40. </li>
  41. <li>
  42. <a href="examples.html">Examples</a>
  43. </li>
  44. </ul>
  45. <ul class="nav navbar-nav navbar-right">
  46. <!-- GitHub buttons: see http://ghbtns.com -->
  47. <li><iframe class="navbar-text" src="http://ghbtns.com/github-btn.html?user=wenzhixin&repo=bootstrap-table&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe></li>
  48. <li><iframe class="navbar-text" src="http://ghbtns.com/github-btn.html?user=wenzhixin&repo=bootstrap-table&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe></li>
  49. <li><iframe class="navbar-text" src="http://ghbtns.com/github-btn.html?user=wenzhixin&type=follow&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="165" height="20"></iframe></li>
  50. </ul>
  51. </nav>
  52. </div>
  53. </header>
  54. <div class="bs-header" id="content">
  55. <div class="container">
  56. <h1>Getting started</h1>
  57. <p>An overview of Bootstrap Table, how to download and use, basic templates, and more.</p>
  58. </div>
  59. </div>
  60. <div class="container">
  61. <div class="row">
  62. <div class="col-md-3">
  63. <div class="bs-sidebar" role="complementary">
  64. <ul class="nav bs-sidenav">
  65. <li><a href="#download">Download</a></li>
  66. <li>
  67. <a href="#usage">Usage</a>
  68. <ul class="nav">
  69. <li><a href="#via-data">Via data attributes</a></li>
  70. <li><a href="#via-javascript">Via JavaScript</a></li>
  71. <li><a href="#options">Options</a></li>
  72. </ul>
  73. </li>
  74. </ul>
  75. </div>
  76. </div>
  77. <div class="col-md-9" role="main">
  78. <div class="page-header alert alert-info">
  79. <a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a>
  80. <b>NOTE:</b> Bootstrap Table is licensed under the <a href="https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE">The MIT License</a>. Completely free, you can arbitrarily use and modify this plugin. If this plugin is useful to you, you can <a href="http://github.com/wenzhixin/bootstrap-table"><b>Star</b></a> this repo, your support is my biggest motive force, thanks.
  81. </div>
  82. <div>
  83. <div class="page-header">
  84. <h1 id="download">Download</h1>
  85. </div>
  86. <p>
  87. <a href="https://github.com/wenzhixin/bootstrap-table/archive/master.zip">Download source</a>
  88. </p>
  89. <p>
  90. <a href="https://github.com/wenzhixin/bootstrap-table">Clone or fork via GitHub</a>
  91. </p>
  92. </div>
  93. <div>
  94. <div class="page-header">
  95. <h1 id="usage">Usage</h1>
  96. </div>
  97. <p>Include Bootstrap library (if your project doesn’t use it already) and bootstrap-table.css in the head tag your html document.</p>
  98. <pre><code>&lt;link rel="stylesheet" href="bootstrap.css"&gt;
  99. &lt;link rel="stylesheet" href="bootstrap-table.css"&gt;</code></pre>
  100. <p>Include jQuery library (if your project doesn’t use it already) and bootstrap-table.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).</p>
  101. <pre><code>&lt;script src="jquery.min.js"&gt;&lt;/script&gt;
  102. &lt;script src="bootstrap-table.js"&gt;&lt;/script&gt;</code></pre>
  103. <hr>
  104. <p>The bootstrap table plugin displays data in a tabular format, via data attributes or JavaScript.</p>
  105. <h2 id="via-data">Via data attributes</h2>
  106. <p>Activate bootstrap table without writing JavaScript. Set data-toggle="table" on a normal table.</p>
  107. <pre><code>&lt;table data-toggle="table" data-url="data.json"&gt;
  108. &lt;thead&gt;
  109. ...
  110. &lt;/thead&gt;
  111. &lt;/table&gt;</code></pre>
  112. <h2 id="via-javascript">Via JavaScript</h2>
  113. <p>Call a bootstrap table with id table with JavaScript.</p>
  114. <pre><code>$('#table').bootstrapTable({
  115. url: 'data.json'
  116. });</code></pre>
  117. <h2 id="options">Options</h2>
  118. <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-url="data.json"</code>. More options see the <a href="documentation.html">Documentation</a> or the <a href="examples.html">Examples</a>.</p>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <!--<a href="https://github.com/wenzhixin/bootstrap-table" class="fork_me"></a>-->
  124. <footer class="bs-footer" role="contentinfo">
  125. <div class="container">
  126. <p>Copyright © 2012-2014, Bootstrap Table is licensed under the The MIT License. Coded by wenzhixin. </p>
  127. <ul class="footer-links">
  128. <li>Currently: v1.1.5</li>
  129. <li class="muted">·</li>
  130. <li><a href="http://wenzhixin.net.cn">My website</a></li>
  131. <li class="muted">·</li>
  132. <li><a href="http://repos.wenzhixin.net.cn">My repos</a></li>
  133. <li class="muted">·</li>
  134. <li><a href="https://github.com/wenzhixin">Github (@wenzhixin)</a></li>
  135. <li class="muted">·</li>
  136. <li><a href="https://github.com/wenzhixin/bootstrap-table/issues?state=open">Issues</a></li>
  137. <li class="muted">·</li>
  138. <li><a href="mailto:wenzhixin2010@gmail.com">Email</a></li>
  139. </ul>
  140. </div>
  141. </footer>
  142. <div class="goto-top">
  143. <i class="glyphicon glyphicon-plane"></i>
  144. </div>
  145. <script src="assets/jquery.min.js"></script>
  146. <script src="assets/bootstrap/js/bootstrap.min.js"></script>
  147. <script src="../src/bootstrap-table.js"></script>
  148. <script src="common.js"></script>
  149. <script src="//wenzhixin.net.cn/js/analytics.js"></script>
  150. <!-- Baidu share -->
  151. <script id="bdshare_js" data="type=slide&amp;img=6&amp;pos=right&amp;uid=6692400"></script>
  152. <script id="bdshell_js"></script>
  153. <!-- Go to www.addthis.com/dashboard to customize your tools -->
  154. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53c78e93678a7b4d"></script>
  155. </body>
  156. </html>