What's the difference between [removed] and [removed] in JavaScript?

后端 未结 16 2119
故里飘歌
故里飘歌 2020-11-22 12:37

Should both of them reference the same object?

16条回答
  •  遥遥无期
    2020-11-22 13:22

    According to the W3C, they are the same. In reality, for cross browser safety, you should use window.location rather than document.location.

    See: http://www.w3.org/TR/html/browsers.html#dom-location

提交回复
热议问题