出于某种原因,我的tbody出现在thead部分之上。无法弄清楚为什么
<table id="myTable" class="table table-inverse table-hover">
<thead id = "headings" class = "thead-default">
<tr>
<th>Žanro pavadinimas</th>
</tr>
</thead>
<tbody>
<tr>
<select name="Zanras">
<option value="demo1">demo1</option>
<option value="demo2">demo2</option>
<option value="demo3">demo3</option>
</select>
</tr>
</tbody>
</table>
答案 0 :(得分:0)
<td>
:
<tbody>
个
<tbody>
<tr>
<td>
<select name="Zanras">
<?php while($row = $resultc->fetch_assoc()) {
echo "<option value=" . $row['Zanro_pavadinimas'] . ">" . $row['Zanro_pavadinimas'] . "</option>";
}
?>
</select>
</td>
</tr>
</tbody>
答案 1 :(得分:0)
<table id="myTable" class="table table-inverse table-hover">
<thead id = "headings" class = "thead-default">
<tr>
<th>Žanro pavadinimas</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<select name="Zanras">
<option value="demo1">demo1</option>
<option value="demo2">demo2</option>
<option value="demo3">demo3</option>
</select>
</td>
</tr>
</tbody>
&#13;
答案 2 :(得分:0)
<td>
中必须<tr>
此外,您应该正确缩进代码以提高可读性。
<table id="myTable" class="table table-inverse table-hover">
<thead id="headings" class="thead-default">
<tr>
<th>Žanro pavadinimas</th>
</tr>
</thead>
<tbody>
<tr>
<td><select name="Zanras">
<option value="demo1">demo1</option>
<option value="demo2">demo2</option>
<option value="demo3">demo3</option>
</select></td>
</tr>
</tbody>
</table>
&#13;