Window History 对象
History 对象包含用户(在浏览器窗口中)访问过的 URL。
History 对象是 window 对象的属性。
History 对象通过以下方式访问:
window.history 或仅用 history:
实例
let length = window.history.length;
亲自试一试
let length = history.length;
亲自试一试
Window History 对象
History 对象包含用户(在浏览器窗口中)访问过的 URL。
History 对象是 window 对象的属性。
History 对象通过以下方式访问:
window.history 或仅用 history:
实例
let length = window.history.length;
亲自试一试
let length = history.length;
亲自试一试