css input submit link

前端 未结 5 2195
梦如初夏
梦如初夏 2021-01-01 18:03

I have this html:

      
相关标签:
5条回答
  • 2021-01-01 18:27

    Use the button element:

    <button type="submit">$ratingLine</button>
    
    0 讨论(0)
  • 2021-01-01 18:37

    You should assign a class to the button

    <input type="submit" value="$ratingLine" class="link-lookalike"/>
    

    and in your css file (or inside a <style type="text/css"></style> tag) use

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

    this way you can assign the class to different buttons in your page (if required), and they will all get the same look.

    0 讨论(0)
  • 2021-01-01 18:41

    You need to add a class, for example "submitClass".

    <input type="submit" value="$ratingLine" class="submitClass"/>
    
       .submitClass {
            background: none;    
            border: none;    
            color: blue;    
            text-decoration: underline;    
            cursor: pointer;
       }
    
    0 讨论(0)
  • 2021-01-01 18:51
    <style type="text/css">
    form input[type="submit"]{
    
        background: none;
        border: none;
        color: blue;
        text-decoration: underline;
        cursor: pointer;
    }
    </style>
    

    Is this not what you're looking for?

    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>       
    

    with your form having an attribute: name="review"

    0 讨论(0)
  • 2021-01-01 18:54

    Here's how I did it with html and css:

    <p><form class='input-to-link-form'><input type="submit" value="Place your order" class="input-to-link"></form> and make payment.</p>
    
    .input-to-link {
      margin: 0;
      padding: 0;
      color: #0088cc;
      text-decoration: none;
      font-weight: 300;
      cursor: pointer;
      background: none;
      border: none;
    }
    
    .input-to-link-form {
      margin: 0 4px 0 0;
      padding: 0;
      float: left;
    }
    
    0 讨论(0)
提交回复
热议问题