[removed].href vs clicking on an Anchor

前端 未结 6 705
鱼传尺愫
鱼传尺愫 2020-12-03 07:17

What\'s the difference between clicking on:


vs.

calling window.location.href = ...

?

6条回答
  •  Happy的楠姐
    2020-12-03 07:47

    document.referrer contains a reference on the server and client to the url of the page that contained the link the user clicked to get to the new page- scripted location methods do not.

提交回复
热议问题