在引导程序模式关闭时重置iframe

时间:2018-08-18 06:45:17

标签: bootstrap-modal

我正在将URL从“第一个”按钮传递到模式iframe。关闭模态并从“第二个”按钮重新打开后,一旦加载了新数据,它将显示旧数据几秒钟。模态关闭后,任何清除iframe数据的方法。

<a href="http://google.com" target="resume_preview"><button type="button"  data-toggle="modal" data-target="#myModal">Button 1</button></a>

<a href="http://yahoo.com" target="resume_preview"><button type="button"  data-toggle="modal" data-target="#myModal">Button 2</button></a>

<!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Preview</h4>
        </div>
        <div class="modal-body">
          
          <iframe width='100%' height='623px' name="resume_preview"></iframe>
        </div>
        
      </div>
      
    </div>
  </div>
  <!-- Modal END-->

0 个答案:

没有答案