【问题标题】:How can I add any URL in this button HTML code?如何在此按钮 HTML 代码中添加任何 URL?
【发布时间】:2021-09-26 09:30:46
【问题描述】:
<button type="button" class="btn btn-outline-secondary mb-3">Order now</button>

我已经尝试在两者之间添加href,但它不起作用。

<button type="button" class="btn btn-outline-secondary mb-3" href="http://webofpicasso.net">Order now</button>

【问题讨论】:

    标签: html json url button href


    【解决方案1】:

    你需要将你的按钮包裹在一个锚标签中。

    像这样:

    <a href="http://webofpicasso.net" ><button type="button" class="btn btn-outline-secondary mb-3">Order now</button></a>
    

    【讨论】:

      猜你喜欢
      • 2021-03-28
      • 2020-04-22
      • 2020-09-10
      • 2018-02-19
      • 2020-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多