• <legend id='uXPoJ'><style id='uXPoJ'><dir id='uXPoJ'><q id='uXPoJ'></q></dir></style></legend>

        <bdo id='uXPoJ'></bdo><ul id='uXPoJ'></ul>
      1. <small id='uXPoJ'></small><noframes id='uXPoJ'>

        <tfoot id='uXPoJ'></tfoot>
        <i id='uXPoJ'><tr id='uXPoJ'><dt id='uXPoJ'><q id='uXPoJ'><span id='uXPoJ'><b id='uXPoJ'><form id='uXPoJ'><ins id='uXPoJ'></ins><ul id='uXPoJ'></ul><sub id='uXPoJ'></sub></form><legend id='uXPoJ'></legend><bdo id='uXPoJ'><pre id='uXPoJ'><center id='uXPoJ'></center></pre></bdo></b><th id='uXPoJ'></th></span></q></dt></tr></i><div id='uXPoJ'><tfoot id='uXPoJ'></tfoot><dl id='uXPoJ'><fieldset id='uXPoJ'></fieldset></dl></div>
      2. 类型错误:使用 jQuery 数据表库时未定义 oColumn

        时间:2023-10-04

            <bdo id='C45YW'></bdo><ul id='C45YW'></ul>

            <small id='C45YW'></small><noframes id='C45YW'>

              <i id='C45YW'><tr id='C45YW'><dt id='C45YW'><q id='C45YW'><span id='C45YW'><b id='C45YW'><form id='C45YW'><ins id='C45YW'></ins><ul id='C45YW'></ul><sub id='C45YW'></sub></form><legend id='C45YW'></legend><bdo id='C45YW'><pre id='C45YW'><center id='C45YW'></center></pre></bdo></b><th id='C45YW'></th></span></q></dt></tr></i><div id='C45YW'><tfoot id='C45YW'></tfoot><dl id='C45YW'><fieldset id='C45YW'></fieldset></dl></div>

                  <tbody id='C45YW'></tbody>
                <legend id='C45YW'><style id='C45YW'><dir id='C45YW'><q id='C45YW'></q></dir></style></legend>

              1. <tfoot id='C45YW'></tfoot>
                  本文介绍了类型错误:使用 jQuery 数据表库时未定义 oColumn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在让 jQuery Datatables 库正确显示在我的 Joomla 网站表格上时遇到问题.http://datatables.net

                  I am having a problem getting the jQuery Datatables library to show up properly on my Joomla website table. http://datatables.net

                  脚本对我的表格进行了一半的样式设置,然后放弃了(我更改了表格标题颜色和文本颜色,但没有数据表控件等).

                  The script is half styling my table and then giving up (I am getting the table header colour changed and text colour, but no datatables controls etc).

                  Firebug 也抛出以下错误:

                  Firebug is also throwing the following error:

                   TypeError: oColumn is undefined
                  

                  在我的 Joomla 模板 index.php 中,我在 中有以下内容:

                  In my Joomla templates index.php I have the following in the <head>:

                  <script src="./datatables/js/jquery.js" type="text/javascript"></script>
                  <script src="./datatables/js/jquery.dataTables.js" type="text/javascript"></script>
                  <script type="text/javascript"> 
                      jQuery.noConflict();                
                      jQuery(document).ready(function() {
                      jQuery('#staff_table').dataTable({
                          "bLengthChange": true,
                          "bFilter": true,
                          "bSort": true,
                          "bInfo": true,
                          "bAutoWidth": true
                          } );
                      } );
                  </script>
                  

                  HTML/PHP 看起来像这样:

                  The HTML / PHP looks like this:

                  <h3>Members of Staff</h3>
                  <p>If you're looking for a member of staff at Tower Road Academy, you'll find their details here.</p>
                  <table class="staff_table" id="staff_table">
                      <tr class="staff_table_head">
                          <th>Name</th>
                          <th>Job Title</th>
                          <th>Email Address</th>
                      </tr>
                  
                      <?php
                          $result = mysql_query("SELECT * FROM itsnb_chronoforms_data_addstaffmember");
                  
                          while($row = mysql_fetch_array($result))
                          { 
                          echo '<tr>';  
                          echo '<td>' . $row['staff_name'] . '</td><td>' . $row['staff_job'] . '</td><td><a     href=mailto:"' . $row['staff_email'] . '">' . $row['staff_email'] . '</a>' . '</td>';
                          echo '</tr>';
                          }
                      ?>
                  </table>
                  

                  推荐答案

                  为了使数据表正常工作,您的表必须使用正确的 构建. 标签.

                  For datatable to work properly, your tables must be constructed with a proper <thead> and <tbody> tags.

                  HTML 中的所有 DataTables 都需要一个

                  ,它格式良好(即有效的 HTML),带有标题(由 定义)HTML 标记)和正文( 标记)

                  All DataTables needs in your HTML is a <TABLE> which is well formed (i.e. valid HTML), with a header (defined by a <THEAD> HTML tag) and a body (a <TBODY> tag)

                  数据表文档

                  这篇关于类型错误:使用 jQuery 数据表库时未定义 oColumn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  <i id='qtMcn'><tr id='qtMcn'><dt id='qtMcn'><q id='qtMcn'><span id='qtMcn'><b id='qtMcn'><form id='qtMcn'><ins id='qtMcn'></ins><ul id='qtMcn'></ul><sub id='qtMcn'></sub></form><legend id='qtMcn'></legend><bdo id='qtMcn'><pre id='qtMcn'><center id='qtMcn'></center></pre></bdo></b><th id='qtMcn'></th></span></q></dt></tr></i><div id='qtMcn'><tfoot id='qtMcn'></tfoot><dl id='qtMcn'><fieldset id='qtMcn'></fieldset></dl></div>

                  <legend id='qtMcn'><style id='qtMcn'><dir id='qtMcn'><q id='qtMcn'></q></dir></style></legend>

                  <tfoot id='qtMcn'></tfoot>
                    <tbody id='qtMcn'></tbody>
                      <bdo id='qtMcn'></bdo><ul id='qtMcn'></ul>

                          <small id='qtMcn'></small><noframes id='qtMcn'>