zoukankan      html  css  js  c++  java
  • HTML 创建按钮实现跳转链接

    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

  • 相关阅读:
    线程
    GridView 1 分页 全选 编辑 删除 更新
    抓取淘宝分类
    ruwnumber自定义分页
    XML随笔
    二进制图片相互转换
    7表单1
    HTML代码1
    6表格
    5图像
  • 原文地址:https://www.cnblogs.com/nxmxl/p/11812242.html
Copyright © 2011-2022 走看看