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

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

Should both of them reference the same object?

16条回答
  •  春和景丽
    2020-11-22 13:37

    document.location was originally a read-only property, although Gecko browsers allow you to assign to it as well. For cross-browser safety, use window.location instead.

    Read more:

    document.location

    window.location

提交回复
热议问题