nxmxl

1.使用 form
<form method="get" action="/page2">
<button type="submit">Continue</button>
</form>

2.JavaScript
<button onclick="window.location.href=\'/page2\'">Continue</button>
<button onclick="location.href=\'http://www.example.com\'" type="button"> www.example.com </button>

3.使用链接,样式设置成按钮
<a href="http://google.com" class="button">Continue</a>

css:

a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;

text-decoration: none;
color: initial;
}

4.链接+button
<a href="http://www.stackoverflow.com/">
<button>Click me</button>
</a>

 

原文链接:https://blog.csdn.net/shuai265/article/details/74079364

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-23
  • 2021-04-27
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-07-02
  • 2022-12-23
相关资源
相似解决方案