Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我熟悉window.history.back()和window.history.forward()javascript 对象。但是有没有一种方法可以创建一个查看最后“X”页数的数组。
window.history.back()
window.history.forward()
不,这将是一个巨大的安全问题。history.length如果你愿意,你可以数一数。
history.length
查看:
你如何在 Javascript 中获取以前的 url?
简而言之,您可以获得以前访问过的网站的数量(history.length),但不能获得 url。