0
而不是屏幕中間的新彈出窗口,我的模態窗口顯示在現有頁面內容上方的全寬。任何想法如何解決?Bootstrap模式是頁面全寬
<div class="container">
<div id='calendar' style="width:65%"></div>
</div>
<div id="popupEventForm" class="modal hide" style="display: none;">
<div class="modal-header"><h3>Add new event</h3></div>
<div class="modal-body">
<form id="EventForm" class="well">
<input type="hidden" id="eventID">
<label>Event title</label>
<input type="text" id="eventTitle" placeholder="Title here"><br />
<label>Scheduled date</label>
<input type="text" id="eventDate"><br />
<label>Scheduled time</label>
<input type="text" id="eventTime"><br />
<label>Appointment length (minutes)</label>
<input type="text" id="eventDuration" placeholder="15"><br />
</form>
</div>
<div class="modal-footer">
<button type="button" id="btnPopupCancel" data-dismiss="modal" class="btn">Cancel</button>
<button type="button" id="btnPopupSave" data-dismiss="modal" class="btn btn-primary">Save event</button>
</div>
</div>
我不使用一個按鈕。在jQuery中,我可以嘗試像這樣$('#myModal')。modal('toggle'); – user1224643
謝謝你們!我添加了$('#popupEventForm')。modal('toggle'); ,一切都很好。 – user1224643
確實很棒:) –