css输入提交链接 [英] css input submit link

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

问题描述

我有这个html:

      <form id="REVIEW" method="post" action="/SortReviews">
        <fieldset class="sort">
          <input type="submit" value="$ratingLine"/>            
        </fieldset>
      </form>

我想给提交按钮一些css,所以它看起来像一个链接。

I want to give the submit button some css, so it looks like a link.

{
    background: none;
    border: none;
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

我如何做?

推荐答案

<style type="text/css">
form input[type="submit"]{

    background: none;
    border: none;
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}
</style>

这不是您要找的?

另一个选项,如上所述,是使用javascript来提交表单onclick锚点元素:

The other option, as already noted, is to use javascript to submit the form onclick of a anchor element:

<a href="#" onclick="document.review.submit()">submit</a>       

您的表单具有属性 name =review

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

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