当我点击超链接" file1"它在新窗口中显示文件,如何在同一窗口中显示?
<div class="main-navigation">
<ul class="navigation">
<li><a href="#file1">File1</a>
</li>
</ul>
</div>
<!-- .main-navigation -->
<div class="page-section" id="file1">
<div class="row"> <b>File1</b>
<div class="col-md-12">
<object data="data/File1.pdf" `enter code here`type="application/pdf" width="500" height="500">
</object>
</div>
</div>
</div>
答案 0 :(得分:2)
对于纯html解决方案,将target =“_ self”属性添加到锚标记应该有效。
<li><a href="#file1" target="_self">File1</a>
</li>
答案 1 :(得分:0)