javascript 打开页面window.location和window.open的区别
时间:2021-01-29 09:29:49|栏目:JavaScript代码|点击: 次
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实现简单的秒表
本文标题:javascript 打开页面window.location和window.open的区别
本文地址:http://www.codeinn.net/misctech/53083.html






