How to make an HTML back link?

后端 未结 12 829
臣服心动
臣服心动 2020-12-12 08:32
12条回答
  •  臣服心动
    2020-12-12 09:23

    A back link is a link that moves the browser backwards one page, as if the user had clicked the Back button available in most browsers. Back links use JavaScript. It moves the browser back one page if your browser supports JavaScript (which it does) and if it supports the window.history object, which is necessary for back links.

    Simple ways are

    Go Back
    

    OR:

    function goBack() {
      window.history.back()
    }
    Go Back

    Generally speaking a back link isn't necessary… the Back button usually suffices quite nicely, and usually you can also simply link to the previous page in your site. However, sometimes you might want to provide a link back to one of several "previous" pages, and that's where a back link comes in handy. So I refer you below tutorial if you want to do in more advanced way:

    http://www.htmlcodetutorial.com/linking/linking_famsupp_108.html

提交回复
热议问题