创建一个输入链接按钮 [英] Creating a input link button

查看:106
本文介绍了创建一个输入链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hello all a quick question ..

hello all a quick question..

我正在构建一个静态html页面,并且希望使用按钮将一个页面放到另一个页面上,现在使用一个链接是更容易的选项,但我想要一个没有任何javascript的按钮的效果..

i am building a static html page, and would like to like one page to another using a button, now using a link is the easier option but i would like the effect of a button without any javascript going off..

所以我想使用输入按钮,但它链接到一个HTML页面就像一个标签可以href。

so i would like to use a input button but it to link to a html page like an tag can href.

我在考虑这个例子,但没有js ..

i was thinking along the lines of this example but without the js..

<form>
  <input type="button" value="Read more" class="button" onclick="window.location.href='testimonials.html'">
</form>

这不起作用,但我正在寻找这个功能?是否有可能?

this doesnt work but i am looking for this functionality?? is it possible?

推荐答案

只需将表单提交到网址即可。

Just submit the form to the URL.

<form action="testimonials.html">
  <input type="submit" value="Read more">
</form>

...但按钮应该做些什么。链接去的地方。不要向人们发送混合信息,请使用链接。

… but buttons are supposed to do stuff. Links go places. Don't send people mixed messages, use a link.

这篇关于创建一个输入链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆