How can I make button take the user to another page on click?

This question already has an answer here:

  • How to create an HTML button that acts like a link? 27 answers

  • You can use one of the following:

    <input type="button" value="Submit" onclick="javascript:window.location.assign("http://google.com");">
    

    A more modern equivalent is:

    <button onclick="javascript:window.location.assign("http://google.com");">
      Submit
    </button>
    

    Hope this helps!

    链接地址: http://www.djcxy.com/p/36566.html

    上一篇: HTML:链接到.html文件的按钮

    下一篇: 如何让按钮使用户进入另一个页面?