<button class="list-group-item" type="button">
<a class="btn-sm btn-info" href="/internal-api/v1/guidances/connector-guidance" target="_blank">Second Button</a>
<div class="btn btn-primary ">Main Button </div>
</button>
有没有一种方法可以防止单击链接(第二按钮)而不导致单击主按钮?
答案 0 :(得分:-3)
<div class="list-group-item" >
<a class="btn-sm btn-info" href="/internal-api/v1/guidances/connector-guidance" target="_blank">Second Button</a>
<button class="btn btn-primary " type="button">Main Button </button>
</div >
这样更改代码,以避免单击父按钮并相应设置样式