getting-started.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title data-zh="开始使用 &middot; Bootstrap Table" data-es="Comenzar con &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="开始使用" data-es="Uso">Usage</a>
  38. </li>
  39. <li>
  40. <a href="documentation.html" data-zh="文档" data-es="Documentación">Docs</a>
  41. </li>
  42. <li>
  43. <a href="examples.html" data-zh="例子" data-es="Demos">Demos</a>
  44. </li>
  45. <li>
  46. <a href="extensions.html" data-zh="扩展" data-es="Extensiones">Extensions</a>
  47. </li>
  48. <li>
  49. <a href="faq.html" data-zh="常见问题" data-es="FAQ">FAQ</a>
  50. </li>
  51. <!-- Localization -->
  52. <li id="locale" class="">
  53. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  54. <img src="blank.gif" class="flag flag-en">
  55. <span class="language">English</span> <span class="caret"></span>
  56. </a>
  57. <ul class="dropdown-menu">
  58. <li class="active" data-locale="en">
  59. <a href="javascript:void(0)">
  60. <img src="blank.gif" class="flag flag-en" alt="United States"> English
  61. </a>
  62. <li data-locale="zh">
  63. <a href="javascript:void(0)">
  64. <img src="blank.gif" class="flag flag-zh" alt="China"> 简体中文
  65. </a>
  66. </li>
  67. <li data-locale="es">
  68. <a href="javascript:void(0)">
  69. <img src="blank.gif" class="flag flag-es" alt="Español"> Español
  70. </a>
  71. </li>
  72. </ul>
  73. </li>
  74. </ul>
  75. <ul class="nav navbar-nav navbar-right">
  76. <!-- GitHub buttons: see http://ghbtns.com -->
  77. <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>
  78. <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>
  79. <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>
  80. </ul>
  81. </nav>
  82. </div>
  83. </header>
  84. <div class="bs-header" id="content">
  85. <div class="container">
  86. <h1>
  87. <span data-zh="开始使用" data-es="Comenzar">Getting started</span>
  88. <a class="edit-pull-request" href="https://github.com/wenzhixin/bootstrap-table/edit/master/docs/getting-started.html" title="Edit the docs">
  89. <i class="glyphicon glyphicon-edit"></i>
  90. </a>
  91. </h1>
  92. <p data-zh="Bootstrap Table的简单介绍,例如如何下载和使用,基本的模板等等。" data-es="Una visión general a Bootstrap Table, como descargar y usar, ejemplos básicos, y más.">An overview of Bootstrap Table, how to download and use, basic templates, and more.</p>
  93. </div>
  94. </div>
  95. <div class="container">
  96. <div class="row">
  97. <div class="col-md-3">
  98. <div class="bs-sidebar" role="complementary">
  99. <ul class="nav bs-sidenav">
  100. <li>Loading...</li>
  101. </ul>
  102. </div>
  103. </div>
  104. <div class="col-md-9" role="main">
  105. <div class="page-header alert alert-info">
  106. <a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a>
  107. <b data-zh="注意:" data-es="NOTA:">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>),您的支持是我最大的动力,谢谢。" data-es="Bootstrap Table está bajo la licencia de <a href='https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE'>The MIT License</a>. Es completamente gratis, además usted puede usarlo y modificarlo como desee. Si este plugin es útil para usted, puede <a href='http://github.com/wenzhixin/bootstrap-table'><b>Star</b></a> este repositorio, su apoyo es mi mayor motivación, gracias.">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>
  108. </div>
  109. <div>
  110. <div class="page-header">
  111. <h1 id="download" data-zh="下载" data-es="Descargar">Download</h1>
  112. </div>
  113. <p>
  114. <a href="https://github.com/wenzhixin/bootstrap-table/archive/master.zip" data-zh="下载源代码" data-es="Descargar el código fuente">Download source</a>
  115. </p>
  116. <p>
  117. <a href="https://github.com/wenzhixin/bootstrap-table" data-zh="通过GitHub克隆或者建立分支" data-es="Clonar el repositorio via GitHub">Clone or fork via GitHub</a>
  118. </p>
  119. </div>
  120. <div>
  121. <div class="page-header">
  122. <h1 id="usage" data-zh="使用" data-es="Uso">Usage</h1>
  123. </div>
  124. <p data-zh="在html页面的head标签中引入Bootstrap库(假如你的项目还没使用)和bootstrap-table.css。" data-es="Incluya la libreria de Bootstrap (si su proyecto aún no la usa) y el archivo bootstrap-table.css en el tag head de su página HTML">Include Bootstrap library (if your project doesn't use it already) and bootstrap-table.css in the head tag your html document.</p>
  125. <pre><code>&lt;link rel="stylesheet" href="bootstrap.min.css"&gt;
  126. &lt;link rel="stylesheet" href="bootstrap-table.css"&gt;</code></pre>
  127. <p data-zh="在head标签或者在body标签闭合前(比较推荐)引入jQuery库和Bootstrap库(假如你的项目还没使用)和bootstrap-table.js。" data-es="Incluya la libreria de jQuery, la libreria de bootstrap (si su proyecto aún no la usa) y el archivo bootstrap-table.js en el tag head o al final de su página HTML, justo antes de que termine el tag body (recomendado para un mejor rendimiento).">Include jQuery library, bootstrap 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>
  128. <pre><code>&lt;script src="jquery.min.js"&gt;&lt;/script&gt;
  129. &lt;script src="bootstrap.min.js"&gt;&lt;/script&gt;
  130. &lt;script src="bootstrap-table.js"&gt;&lt;/script&gt;</code></pre>
  131. <hr>
  132. <p data-zh="Bootstrap Table通过data属性标签或者JavaScript来显示表格数据。" data-es="El plugin Bootstrap Table muestra los datos en formato tabular, vía atribuots HTML o JavaScript">The Bootstrap Table plugin displays data in a tabular format, via data attributes or JavaScript.</p>
  133. <div class="page-header">
  134. <h2 id="via-data" data-zh="通过data属性标签" data-es="Vía atributos HTML">Via data attributes</h2>
  135. </div>
  136. <p data-zh='在一个普通的表格中设置data-toggle="table"可以在不写JavaScript的情况下启用Bootstrap Table。' data-es="Active bootstrap table sin escribir código JavaScript. Setee el atributo data-toggle='table' es una tabla normal de HTML">Activate bootstrap table without writing JavaScript. Set data-toggle="table" on a normal table.</p>
  137. <pre><code>&lt;table data-toggle="table" data-url="data.json"&gt;
  138. &lt;thead&gt;
  139. ...
  140. &lt;/thead&gt;
  141. &lt;/table&gt;</code></pre>
  142. <div class="page-header">
  143. <h2 id="via-javascript" data-zh="通过JavaScript" data-es="Vía JavaScript">Via JavaScript</h2>
  144. </div>
  145. <p data-zh="通过JavaScript来启用带有id属性的Table。" data-es="Llame a bootstrap table con el id de la table por medio de JavaScript">Call a bootstrap table with id table with JavaScript.</p>
  146. <pre><code>$('#table').bootstrapTable({
  147. url: 'data.json'
  148. });</code></pre>
  149. <div class="page-header">
  150. <h2 id="options" data-zh="属性" data-es="Opciones">Options</h2>
  151. </div>
  152. <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>。' data-es="Las opciones pueden ser pasados vía atributos HTML o JavaScript. Por atributos HTML, incluya la opción llamada <code>data-</code>, por ejemplo <code>data-url='data.json'</code>. Para más opciones revise la <a href='documentation.html'>Documentación</a> o los <a href='examples.html'>Ejemplos</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>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <!--<a href="https://github.com/wenzhixin/bootstrap-table" class="fork_me"></a>-->
  158. <footer class="bs-footer" role="contentinfo">
  159. <div class="container">
  160. <p>Copyright © 2012-2014, Bootstrap Table is licensed under the The MIT License. Coded by wenzhixin. </p>
  161. <ul class="footer-links">
  162. <li>Currently: v1.3.0</li>
  163. <li class="muted">·</li>
  164. <li><a href="http://wenzhixin.net.cn">My website</a></li>
  165. <li class="muted">·</li>
  166. <li><a href="http://repos.wenzhixin.net.cn">My repos</a></li>
  167. <li class="muted">·</li>
  168. <li><a href="https://github.com/wenzhixin">Github (@wenzhixin)</a></li>
  169. <li class="muted">·</li>
  170. <li><a href="https://github.com/wenzhixin/bootstrap-table/issues?state=open">Issues</a></li>
  171. <li class="muted">·</li>
  172. <li><a href="mailto:wenzhixin2010@gmail.com">Email</a></li>
  173. </ul>
  174. </div>
  175. </footer>
  176. <div class="goto-top">
  177. <i class="glyphicon glyphicon-plane"></i>
  178. </div>
  179. <div id="bulletin" class="bulletin">
  180. <ul>
  181. <li><a href="http://repos.wenzhixin.net.cn/">My Repositories - Show my repositories list.</a></li>
  182. <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>
  183. <li><a href="https://github.com/wenzhixin/bootstrap-show-password">Bootstrap Show Password - Show/hide password plugin for bootstrap.</a></li>
  184. <li><a href="http://wenzhixin.net.cn/p/bulletin/">Bulletin - A jQuery plugin to show bulletin for website.</a></li>
  185. </ul>
  186. <div class="close"><a href="javascript:void(0)">×</a></div>
  187. </div>
  188. <script src="assets/jquery.min.js"></script>
  189. <script src="assets/bootstrap/js/bootstrap.min.js"></script>
  190. <script src="assets/bulletin/jquery.bulletin.js"></script>
  191. <script src="../src/bootstrap-table.js"></script>
  192. <script src="common.js"></script>
  193. <script src="//wenzhixin.net.cn/js/analytics.js"></script>
  194. <!-- Go to www.addthis.com/dashboard to customize your tools -->
  195. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53c78e93678a7b4d"></script>
  196. </body>
  197. </html>