HTML 创建按钮实现跳转链接
2017-07-01 20:13
253 查看
How to create an HTML button that acts like a link?
css:
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>
相关文章推荐
- jsp 中实现点击按钮 实现页面跳转到HTML
- 如何实现点击一个按钮后跳转的指定的链接页面
- js 按钮实现跳转页面 jsp html
- iOS 用html创建带下划线的链接(类似下划线按钮的功能)
- WebView 链接(或按钮)向 Activity 跳转的几种实现方式
- HTML基础 a标签实现点击超链接后新建一个网页跳转到指定链接
- 在java代码中输出Html代码实现按钮点击链接跳转
- div加链接 html给div加超链接实现点击div跳转的方法[申明:来源于网络]
- html利用map和area属性来实现创建图像链接,以及创建可点击图像热区
- div加链接 html给div加超链接实现点击div跳转的方法
- html点击按钮 重新加载页面或者跳转页面实现
- 用按钮或链接实现JSP页面跳转
- HTML点击按钮或链接不跳转只刷新页面的方法
- js 按钮实现跳转页面 jsp html
- 创建一个复制UBB软件信息的链接或按钮的js代码
- 实现html中就一个按钮和一个文本框,点击按钮显示文本框,再点击文本框消失,再次点击又出现。
- 利用JS动态创建html控件并在后台实现取值
- 禁用IE的后退按钮|显示网页已过期|几种语言的实现方法|c#|javascript|html
- 利用JQuery实现HTML页面跳转
- dedecms v5 跳转网址 直接链接而非跳转的实现方法修正版[原创]_dedecms_脚本之家