如何使 input type=button 像超链接一样使用 get 请求重定向? [英] How to make an input type=button act like a hyperlink and redirect using a get request?
本文介绍了如何使 input type=button 像超链接一样使用 get 请求重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使 像超链接一样使用
GET
请求重定向?
How do I make a <input type=button>
act like a hyperlink and redirect using a GET
request?
推荐答案
你可以让 标签做这样的动作:
You can make <button>
tag to do action like this:
<a href="http://www.google.com/">
<button>Visit Google</button>
</a>
或:
<a href="http://www.google.com/">
<input type="button" value="Visit Google" />
</a>
它很简单,不需要 javascript!
It's simple and no javascript required!
注意:
此方法不适用于 HTML 结构.但是,它适用于许多现代浏览器.请参阅以下参考:
This approach is not valid from HTML structure. But, it works on many modern browser. See following reference :
这篇关于如何使 input type=button 像超链接一样使用 get 请求重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文