window.location.href="http://www.so.com" 这是一种方式。 还有另外一种方式 window.open("http://www.baidu.com","_blank") 这个可以指定是否在一个新的页面打开。