我在Spring Tool Suite的Bootstrap中工作。我有一个html页面(reprint-emblems-reports.html),我希望在按下Go按钮后显示该页面。我正在通过localhost工作。该网站不在线。我是html的新手。
以下是Go按钮的代码。
<button type="button" class="btn btn-aramark-primary">Go</button>
Go按钮位于reprint-emblems.html内。
reprint-emblems-reports.html位于同一文件夹(reprint-emblems)
中我想点击Go按钮弹出一个新标签,并显示reprint-emblems-reports.html页面。
谢谢
答案 0 :(得分:2)
您可以添加&#34; onclick&#34;按钮上的属性:
<button type="button" class="btn btn-aramark-primary" onclick="window.open('/your-path')">Go</button>
window.open()可以打开一个新选项卡或新窗口(取决于您的浏览器配置)
答案 1 :(得分:1)
您可以使用javascript
<button onclick="window.location.href='/your path here'" type="button" class="btn btn-aramark-primary">Go</button>