有时候我们需要用js来实现打开页面,因为js下有window.location.href和window.open的不同实现方法
self.location.href=”http://www.xxxxxxxx.com” 当前页面打开URL页面
location.href=”http://www.xxxxxxxx.com” 当前页面打开URL页面
windows.location.href=”http://www.xxxxxxxx.com” 当前页面打开URL页面,前面三个用法相同。
window.location.href = "http://www.xxxxxxxx.com" 跳转后有后退功能
window.location.replace("http://www.xxxxxxxx.com") 跳转后没有后退功能
window.open("http://www.xxxxxxxx.com") 在新的窗口打开链接 .(注意:这个一般用于简单的弹出页面。)