我在如何将数据表中的数据转换为模态形式方面遇到了问题。这是我的数据表的PHP代码:
$cTableBody .= '<tr>
<td>'.date('m/d/Y',strtotime($date_created)).'</td>
<td>
<a href="#" data-toggle="modal" data-target="#editMyReservation"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="#" data-toggle="modal" data-target="#deleteMyReservation"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>';
我的模态形式就是这个
<div class="modal fade" id="editMyReservation" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
EDIT RESERVATION
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="create-date" class="control-label col-sm-3">Date Created: </label>
<div class="col-sm-6">
<input type="date" class="form-control" id="disabledInput" disabled/>
</div>
</form>
<button type="button" class="btn btn-sm btn-success">SAVE</button>
</div>
</div>
</div>
</div>
我不知道如何传递值。
答案 0 :(得分:0)
我建议你可以使用javascript获取值,并通过AJAX将值传递给php。