Document.location.href和.replace的区别示例介绍
document.location.href和document.location.replace都可以实现从A页面切换到B页面,但他们的区别是: 用document.location.href切换后,可以退回到原页面。 而用document.location.replace切换后,不可以通过“后退”退回到原页面。 关于document.location.href或其他可回退的切换方式,我还发现一个细节, 用个例子来说明: 假设有A.htm B.htm C....