javascript 打开页面window.location和window.open的区别_Javascript教程-查字典教程网
javascript 打开页面window.location和window.open的区别
javascript 打开页面window.location和window.open的区别
发布时间:2016-12-30 来源:查字典编辑
摘要:window.location="http://www.xxxxxxxx.net"跳转后有后退功能其实应该是window.location....

window.location = "http://www.xxxxxxxx.net" 跳转后有后退功能

其实应该是 window.location.href

window.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能

window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接

这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类