小兔网

方法:1、使用onclick事件,在标签内添加“onclick="window.location.href="https://zhishitu.com/ke">

HTML如何实现点击button页面跳转

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。

方法1:使用onclick事件

<input type="button" value="按钮"onclick="javascrtpt:window.location.href="https://zhishitu.com/ke" />

或者直接使用button标签

<button onclick="window.location.href="https://zhishitu.com/ke">

方法2:在button标签外套一个a标签

<a href="https://zhishitu.com/ke"    <button>百度</button></a>

或使用

<a href="https://zhishitu.com/ke"      <input type="button" value="百度" /></a>

方法3:使用JavaScript函数

<script>      function jump() {        window.location.href="https://zhishitu.com/ke"      }    </script>    <input type="button" value="百度" onclick="javascrtpt:jump()" />    <!-- 或者<input type="button" value="百度" onclick="jump()" />  -->    <!-- 或者<button onclick="jump()">百度</button> -->

推荐学习:html视频教程

以上就是HTML如何实现点击button页面跳转的知识。速戳>>知识兔学习精品课!