我在使用 Spring Tool Suite 的 Bootstrap 中工作。我有一个我制作的 html 页面 (reprint-emblems-reports.html),我希望在单击 Go 按钮后显示此页面。我正在通过本地主机工作。该网站不是实时的。我是 html 新手。
这是 Go 按钮的代码。
<button type="button" class="btn btn-aramark-primary">Go</button>
Go 按钮位于 reprint-emblems.html 中。
reprint-emblems-reports.html 位于同一文件夹 (reprint-emblems)
我希望单击“开始”按钮打开一个新选项卡并显示 reprint-emblems-reports.html 页面。
谢谢
最佳答案
您可以在按钮上添加“onclick”属性:
<button type="button" class="btn btn-aramark-primary" onclick="window.open('/your-path')">Go</button>
window.open() 可以打开新标签页或新窗口(取决于您的浏览器配置)
关于html - 单击按钮链接到新窗口中的 html 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34188165/