getting-started.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title data-zh="开始使用 &middot; Bootstrap Table">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="assets/bulletin/bulletin.css">
  10. <link rel="stylesheet" href="../src/bootstrap-table.css">
  11. <link rel="stylesheet" href="docs.css">
  12. <!--<link rel="stylesheet" href="//wenzhixin.net.cn/css/fork.css">-->
  13. <!--[if lt IE 9]>
  14. <script src="//wenzhixin.net.cn/js/html5shiv.js"></script>
  15. <script src="//wenzhixin.net.cn/js/respond.min.js"></script>
  16. <![endif]-->
  17. </head>
  18. <body>
  19. <a class="sr-only" href="#content">Skip to main content</a>
  20. <header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
  21. <div class="container">
  22. <button class="navbar-toggle" type="button" data-toggle="collapse"
  23. data-target=".bs-navbar-collapse">
  24. <span class="sr-only">Toggle navigation</span>
  25. <span class="icon-bar"></span>
  26. <span class="icon-bar"></span>
  27. <span class="icon-bar"></span>
  28. </button>
  29. <div class="navbar-header">
  30. <a class="navbar-brand" href="index.html">
  31. Bootstrap Table
  32. </a>
  33. </div>
  34. <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
  35. <ul class="nav navbar-nav">
  36. <li class="active">
  37. <a href="getting-started.html" data-zh="开始使用">Getting started</a>
  38. </li>
  39. <li>
  40. <a href="documentation.html" data-zh="文档">Documentation</a>
  41. </li>
  42. <li>
  43. <a href="examples.html" data-zh="例子">Examples</a>
  44. </li>
  45. <!-- Localization -->
  46. <li id="locale" class="">
  47. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  48. <img src="blank.gif" class="flag flag-en">
  49. <span class="language">English</span> <span class="caret"></span>
  50. </a>
  51. <ul class="dropdown-menu">
  52. <li class="active" data-locale="en">
  53. <a href="javascript:void(0)">
  54. <img src="blank.gif" class="flag flag-en" alt="United States"> English
  55. </a>
  56. <li data-locale="zh">
  57. <a href="javascript:void(0)">
  58. <img src="blank.gif" class="flag flag-zh" alt="China"> 简体中文
  59. </a>
  60. </li>
  61. </ul>
  62. </li>
  63. </ul>
  64. <ul class="nav navbar-nav navbar-right">
  65. <!-- GitHub buttons: see http://ghbtns.com -->
  66. <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>
  67. <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>
  68. <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="175" height="20"></iframe></li>
  69. </ul>
  70. </nav>
  71. </div>
  72. </header>
  73. <div class="bs-header" id="content">
  74. <div class="container">
  75. <h1 data-zh="开始使用">Getting started</h1>
  76. <p data-zh="Bootstrap Table的简单介绍,例如如何下载和使用,基本的模板等等。">An overview of Bootstrap Table, how to download and use, basic templates, and more.</p>
  77. </div>
  78. </div>
  79. <div class="container">
  80. <div class="row">
  81. <div class="col-md-3">
  82. <div class="bs-sidebar" role="complementary">
  83. <ul class="nav bs-sidenav">
  84. <li>Loading...</li>
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="col-md-9" role="main">
  89. <div class="page-header alert alert-info">
  90. <a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a>
  91. <b data-zh="注意:">NOTE:</b> <span data-zh="Bootstrap Table 是基于 <a href='https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE'>The MIT License</a> 的开源项目,你可以任意的使用和修改这个插件。假如您觉得这个开源项目对你有帮助,麻烦给这个项目加颗星(<a href='http://github.com/wenzhixin/bootstrap-table'><b>Star</b></a>),您的支持是我最大的动力,谢谢。">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.</span>
  92. </div>
  93. <div>
  94. <div class="page-header">
  95. <h1 id="download" data-zh="下载">Download</h1>
  96. </div>
  97. <p>
  98. <a href="https://github.com/wenzhixin/bootstrap-table/archive/master.zip" data-zh="下载源代码">Download source</a>
  99. </p>
  100. <p>
  101. <a href="https://github.com/wenzhixin/bootstrap-table" data-zh="通过GitHub克隆或者建立分支">Clone or fork via GitHub</a>
  102. </p>
  103. </div>
  104. <div>
  105. <div class="page-header">
  106. <h1 id="usage" data-zh="使用">Usage</h1>
  107. </div>
  108. <p data-zh="在html页面的head标签中引入Bootstrap库(假如你的项目还没使用)和bootstrap-table.css。">Include Bootstrap library (if your project doesn't use it already) and bootstrap-table.css in the head tag your html document.</p>
  109. <pre><code>&lt;link rel="stylesheet" href="bootstrap.css"&gt;
  110. &lt;link rel="stylesheet" href="bootstrap-table.css"&gt;</code></pre>
  111. <p data-zh="在head标签或者在body标签闭合前(比较推荐)引入jQuery库(假如你的项目还没使用)和bootstrap-table.js。">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>
  112. <pre><code>&lt;script src="jquery.min.js"&gt;&lt;/script&gt;
  113. &lt;script src="bootstrap-table.js"&gt;&lt;/script&gt;</code></pre>
  114. <hr>
  115. <p data-zh="Bootstrap Table通过data属性标签或者JavaScript来显示表格数据。">The Bootstrap Table plugin displays data in a tabular format, via data attributes or JavaScript.</p>
  116. <div class="page-header">
  117. <h2 id="via-data" data-zh="通过data属性标签">Via data attributes</h2>
  118. </div>
  119. <p data-zh='在一个普通的表格中设置data-toggle="table"可以在不写JavaScript的情况下启用Bootstrap Table。'>Activate bootstrap table without writing JavaScript. Set data-toggle="table" on a normal table.</p>
  120. <pre><code>&lt;table data-toggle="table" data-url="data.json"&gt;
  121. &lt;thead&gt;
  122. ...
  123. &lt;/thead&gt;
  124. &lt;/table&gt;</code></pre>
  125. <div class="page-header">
  126. <h2 id="via-javascript" data-zh="通过JavaScript">Via JavaScript</h2>
  127. </div>
  128. <p data-zh="通过JavaScript来启用带有id属性的Table。">Call a bootstrap table with id table with JavaScript.</p>
  129. <pre><code>$('#table').bootstrapTable({
  130. url: 'data.json'
  131. });</code></pre>
  132. <div class="page-header">
  133. <h2 id="options" data-zh="属性">Options</h2>
  134. </div>
  135. <p data-zh='属性设置可以通过data属性标签或者JavaScript。对于data属性标签,增加<code>data-</code>到html标签即可,例如<code>data-url="data.json"</code>。更多的属性设置查看<a href="documentation.html">文档</a> 或者 <a href="examples.html">例子</a>。'>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>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <!--<a href="https://github.com/wenzhixin/bootstrap-table" class="fork_me"></a>-->
  141. <footer class="bs-footer" role="contentinfo">
  142. <div class="container">
  143. <p>Copyright © 2012-2014, Bootstrap Table is licensed under the The MIT License. Coded by wenzhixin. </p>
  144. <ul class="footer-links">
  145. <li>Currently: v1.2.2</li>
  146. <li class="muted">·</li>
  147. <li><a href="http://wenzhixin.net.cn">My website</a></li>
  148. <li class="muted">·</li>
  149. <li><a href="http://repos.wenzhixin.net.cn">My repos</a></li>
  150. <li class="muted">·</li>
  151. <li><a href="https://github.com/wenzhixin">Github (@wenzhixin)</a></li>
  152. <li class="muted">·</li>
  153. <li><a href="https://github.com/wenzhixin/bootstrap-table/issues?state=open">Issues</a></li>
  154. <li class="muted">·</li>
  155. <li><a href="mailto:wenzhixin2010@gmail.com">Email</a></li>
  156. </ul>
  157. </div>
  158. </footer>
  159. <div class="goto-top">
  160. <i class="glyphicon glyphicon-plane"></i>
  161. </div>
  162. <div id="bulletin" class="bulletin">
  163. <ul>
  164. <li><a href="http://repos.wenzhixin.net.cn/">My Repositories - Show my repositories list.</a></li>
  165. <li><a href="http://wenzhixin.net.cn/p/multiple-select/">Multiple Select - Multiple select is a jQuery plugin to select multiple elements with checkboxes.</a></li>
  166. <li><a href="https://github.com/wenzhixin/bootstrap-show-password">Bootstrap Show Password - Show/hide password plugin for bootstrap.</a></li>
  167. <li><a href="http://wenzhixin.net.cn/p/bulletin/">Bulletin - A jQuery plugin to show bulletin for website.</a></li>
  168. </ul>
  169. <div class="close"><a href="javascript:void(0)">×</a></div>
  170. </div>
  171. <script src="assets/jquery.min.js"></script>
  172. <script src="assets/bootstrap/js/bootstrap.min.js"></script>
  173. <script src="assets/bulletin/jquery.bulletin.js"></script>
  174. <script src="../src/bootstrap-table.js"></script>
  175. <script src="common.js"></script>
  176. <script src="//wenzhixin.net.cn/js/analytics.js"></script>
  177. <!-- Baidu share -->
  178. <script id="bdshare_js" data="type=slide&amp;img=6&amp;pos=right&amp;uid=6692400"></script>
  179. <script id="bdshell_js"></script>
  180. <!-- Go to www.addthis.com/dashboard to customize your tools -->
  181. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53c78e93678a7b4d"></script>
  182. </body>
  183. </html>