我已经让数据表工作了。唯一的问题是它的标题是正常高度的两倍。这似乎是由于非常宽的列表框;
“显示 [显示选项 10,25,50,All] ..line break.. 条目的宽列表框”
实际上这应该放在一行中;但是由于列表框的宽度,它在标题上占据了第二行,使标题太胖了。同样,页脚(寻呼机)也有双倍高度。我该如何解决?
谢谢, Vineet 代码来自web2py框架(基于python)的头文件——
script tag
$(document).ready(function() {
var oTable = $('#dept_table').dataTable( {
"bJQueryUI": true,
"sScrollY": "200px",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
'sPaginationType': 'full_numbers'
});
});
end script tag
在身体里 -
<h1>Department Master</h1>
<input type='submit' id='addNew' value='Add New Department' /><br /><br />
<table id="dept_table">
<thead>
<tr>
<th>Department ID</th>
<th>Department Name</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{{for department in departments:}}
<tr>
<td>{{=department['deptid']}}</td>
<td>{{=department['deptnm']}}</td>
<td>
{{=A('edit',_href=URL('frmDeptSave',vars={'did':department['deptid'],'dnm':department['deptnm']}),_class='edturl')}}
{{=A('delete',_href=URL('frmDeptDel',vars={'did':department['deptid'],'dnm':department['deptnm']}),_class='delurl')}}
</td>
</tr>
{{pass}}
</tbody>
</table>
PL。告诉我您是否需要其他任何东西来提出解决方案。---Vineet