Add link to button HTML

后端 未结 6 2040
独厮守ぢ
独厮守ぢ 2020-12-06 23:22

I\'m trying to add link to my buttons.

My current HTML codes are below


  
6条回答
  •  隐瞒了意图╮
    2020-12-06 23:39

    You should use a tag :

    Get support
    

    If the only reason you want a tag is style, you can easily style tag

    a {
        display: inline-block;
        text-decoration: none;
        background-color: #eee;
        border: 2px outset #ccc;
        color: #000;
        padding: 5px 8px;
        margin: 5px;
    }
    

    If you absolutly want to use a tag you could do it using javascript like so :

    
    

    Nevertheless, keep in mind that using a button is not proper code, they are not dedicated to links

提交回复
热议问题