0
對不起,我對JQuery並不熟悉,但我會全力以解。
作爲下面的代碼,我將創建並顯示一個引導模式,其中包含一個動態輸入值「id」,指定要刪除的項目。如何使用動態表單內容創建和顯示模態?
<div class="modal fade" id="myDeleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title">Input the password to delete</h2>
</div>
<div class="modal-body">
<form id="modal-form" method="post" action="password_wrong.html" enctype="multipart/form-data" >
<div class="form-group">
<input type="password" class="form-control" id="res-passwd" name="password" required="required" placeholder="Password:"/>
<input type="hidden" name="delete_id" value="{dynamic}"/>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-default" form="modal-form" >Delete</button>
</div>
</div>
唯一活力的地方是
<input type="hidden" name="delete_id" value="{dynamic}"/>
我怎麼能這樣做?