我正在使用一个 Jquery 插件 treeTable 来显示一个 html 表格。http://ludo.cubicphuse.nl/jquery-plugins/treeTable/doc/我的代码如下:
<html>
<head>
<link href="treeTable/src/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="treeTable/src/javascripts/jquery.treeTable.js"></script>
<script type="text/javascript" src="treeTable/doc/javascripts/jquery.js"></script>
<script type="text/javascript" src="treeTable/doc/javascripts/jquery.ui.js"></script>
<script>
$(document).ready(function() {
$('.type_struct_class').treeTable({
initialState: 'collapsed'
});
$('table#type_struct tbody tr').mousedown(function() {
$('tr.selected').removeClass('selected');
$(this).addClass('selected');
});
$(\"table#type_struct tbody tr span\").mousedown(function() {
$($(this).parents(\"tr\")[0]).trigger(\"mousedown\");
});
});
</script>
</head>
<body>
<table class='type_struct_class' id='type_struct'>
<tr id="node-1">
<td>Parent</td><td>100</td><td>1000</td>
</tr>
<tr id="node-2" class="child-of-node-1">
<td>Child</td><td>200</td><td>2000</td>
</tr>
<tr id="node-3" class="child-of-node-2">
<td>Child</td><td>300</td><td>3000</td>
</tr>
</table>
</body>
</html>
我没有看到表格格式化,就像子节点和父节点一样。它在我的 Chrome 浏览器中显示为普通表格。谁能帮助我哪里出错了?