javascript 打开页面window.location和window.open的区别
作者:bea
window.location = "http://www.xxxxxxxx.net" 跳转后有后退功能 其实应该是 window.location.hrefwindow.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能 window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接 这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了
window.location = "http://www.xxxxxxxx.net" 跳转后有后退功能
其实应该是 window.location.href
window.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能
window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接
这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了
有用 |
无用
其实应该是 window.location.href
window.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能
window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接
这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了
猜你喜欢
您可能感兴趣的文章:
- Javascript 匿名函数及其代码模式原理
- JS 有名函数表达式全面解析
- Jquery Ajax学习实例6 向WebService发出请求,返回DataSet(XML) 异步调用
- JavaScript 高效运行代码分析
- JS setCapture 区域外事件捕捉
- javascript 实现滚动效果代码整理
- JavaScript 无缝上下左右滚动加定高定宽停顿效果(兼容ie/ff)
- 小议Javascript中的this指针
- js实现的类marquee水平循环滚动
- js 把字符串当函数执行的方法
- jQuery each()方法的使用方法
- jQuery each()小议
- jquery ajax执行后台方法
- jQuery中与toggleClass等价的程序段 以及未来学习的方向
- javascript 验证日期的函数
- 12个非常有创意的JavaScript小游戏
- JQuery 插件模板 制作jquery插件的朋友可以参考下
- jquery 简单图片导航插件jquery.imgNav.js
- Array.prototype.slice.apply的使用方法