引導模式是否有onload事件?當打開模式時,我想調用一個http GET請求,以使用rest api中的數據填充模式。我在模態中有一個窗體,我在窗體的onload事件上調用了GET函數,但它不起作用。Bootstrap模式onload事件
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Agent details:</h4>
</div>
<div class="modal-body">
<form onload="getData()" style= "font-size: 16pt">
請在這裏提問之前仔細閱讀文檔。這不是我們不想幫忙,而是我們希望您先嚐試自己做。 – Blazemonger