首页 > 解决方案 > 如何在按钮的帮助下重定向网页

问题描述

<div class="navbar">
  <a>
    <div class="grid__item theme-1">
      <button class="action"></button>
      <button class="particles-button">Home</button>
    </div>
  </a>
</div>

在此效果应用中,效果完成后如何重定向它?

标签: javascripthtmlcss

解决方案


<button onclick="window.location.href='https://google.com'">Go to link</button>

推荐阅读