window.location.replace和window.location.href区别
来源:互联网 发布:景区历年游客数据统计 编辑:程序博客网 时间:2024/06/06 14:11
有3个页面 a,b,c
如果当前页面是c页面,并且c页面是这样跳转过来的:a->b->c
1:b->c 是通过window.location.replace("..xx/c") 此时b页面的url会被c页面代替,并且点击后退按钮时会回退到a页面(最开始的页面)
2:b->c是通过window.location.href("..xx/c") 此时b页面的路径会被c页面代替,但是点击回按钮后页面回退的是b页面
两者的区别: 两者后退时所回退的页面不一样
0 0
- window.location.href和window.location.replace
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- Java工具类——文件操作
- MVP架构在Android平台上的实现分析(一)
- 快速排序及其改进
- JMeter学习笔记2-图形界面简单介绍
- 关于分酒的问题
- window.location.replace和window.location.href区别
- Python中常见类型的常用函数
- 论今日头条背后的产品逻辑分析
- Angularjs学习笔记——服务
- android init.c
- ArchLinux调节屏幕亮度
- 树莓派3B驱动Kinect for windows(OpenNI)
- 写博客写博客
- Java异常打印输出中常见方法的分析