【发布时间】:2017-07-02 20:13:39
【问题描述】:
所以目前我正试图弄清楚如何将下拉菜单添加到我在下面发布的代码中。我已经搜索了互联网,但找不到适合我的方法,我对编码很陌生,所以这对我来说有点困难,其他人可能会觉得这很容易。
<table class="table table-bordered table-striped">
<thead> <!-- add class="thead-inverse" for a dark header -->
<tr>
<th>ID</th>
<th>USERNAME</th>
<th>Crime(s)</th>
<th>Active</th>
<th>EDIT</th>
</tr>
</thead>
<tfoot>
<tr>
</tr>
</div>
</th>
</tfoot>';
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
$output .= '
<tr>
<td>'.$row["id"].'</td>
<td class="username" data-id1="'.$row["id"].'" contenteditable>'.$row["name"].'</td>
<td class="crime" data-id2="'.$row["id"].'" contenteditable>'.$row["crime"].'</td>
<td class="activated" data-id2="'.$row["id"].'" contenteditable>'.$row["activated"].'</td>
<td><button type="button" name="delete_btn" data-id3="'.$row["id"].'" class="btn btn-xs btn-danger btn_delete">DELETE</button></td>
</tr>
';
}
$output .= '
<tr>
<td></td>
<td id="name" contenteditable></td>
<td id="crime" contenteditable></td>
<td id="activated" contenteditable></td>
<td><button type="button" name="btn_add" id="btn_add" class="btn btn-xs btn-success">ADD ACCOUNT</button></td>
</tr>
';
}
else
{
$output .= '<tr>
<td colspan="4">Data not Found</td>
</tr>';
}
$output .= '</table>
</div>';
echo $output;
?>
【问题讨论】:
-
为了清楚起见,我想在您单击活动下的框时添加一个下拉菜单,该框将有几个选项,单击后会出现一个下拉菜单,然后您选择一个选项,然后更改和更新.
-
您要在哪里添加下拉菜单?它应该包含什么值@bluqe-bluqe
-
@AceKYD 我正在尝试将下拉菜单添加到已激活的部分。它将包含是、否和正在验证。