我有以下代码:
<div id="makatiPD" class="modal fade">
<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">Makati City Office</h4>
</div>
<div class="modal-body">
<iframe width="540" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=King's+Court+Building.,+Makati+City,+Metro+Manila,+Philippines&aq=0&oq=kings+court&sll=13.656663,124.090576&sspn=9.2249,9.876709&ie=UTF8&hq=&hnear=King's+Court+Bldg+2,+Dela+Rosa+Street,+Lungsod+ng+Makati,+Metro+Manila,+Philippines&t=m&ll=14.558164,121.013203&spn=0.029076,0.046349&z=14&iwloc=A&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=King's+Court+Building.,+Makati+City,+Metro+Manila,+Philippines&aq=0&oq=kings+court&sll=13.656663,124.090576&sspn=9.2249,9.876709&ie=UTF8&hq=&hnear=King's+Court+Bldg+2,+Dela+Rosa+Street,+Lungsod+ng+Makati,+Metro+Manila,+Philippines&t=m&ll=14.558164,121.013203&spn=0.029076,0.046349&z=14&iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<div id="quezonPD" class="modal fade">
<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">Quezon City Office</h4>
</div>
<div class="modal-body">
<iframe width="540" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Phil-Data+Building,+265+E.+Rodriguez+Sr.+Avenue,+Quezon+City,+Metro+Manila,+Philippines&aq=&sll=14.618293,121.006191&sspn=0.00898,0.009645&ie=UTF8&hq=Phil-Data+Building,&hnear=E+Rodriguez+Sr.+Ave,+Quezon+City,+Metro+Manila,+Philippines&ll=14.618293,121.006191&spn=0.006295,0.006295&t=m&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=Phil-Data+Building,+265+E.+Rodriguez+Sr.+Avenue,+Quezon+City,+Metro+Manila,+Philippines&aq=&sll=14.618293,121.006191&sspn=0.00898,0.009645&ie=UTF8&hq=Phil-Data+Building,&hnear=E+Rodriguez+Sr.+Ave,+Quezon+City,+Metro+Manila,+Philippines&ll=14.618293,121.006191&spn=0.006295,0.006295&t=m" style="color:#0000FF;text-align:left">View Larger Map</a></small>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
它工作得很好,调用它没有问题。但是,这种设置不会以某种方式阻碍我网站的加载时间吗?我真的没有遇到任何麻烦,但由于我仍在本地运行网站,我不太确定在我部署它时是否会产生一些问题。
更多信息:该页面在本地加载得很好,但它继续显示它正在加载一些东西。(我认为是 2 个 iFrame。)
那么有什么方法可以在我触发每个单独的模态时以某种方式仅加载 iframe 吗?