JavaScript中的Window.location.href和Window.open()方法
 JavaScript中的window.location.href和window.open ()方法有什么区别? 
  window.location.href 不是一个方法,它是一个属性,会告诉你浏览器的当前URL位置。 更改属性的值将redirect页面。 
  window.open()是一种方法,您可以将URL传递到您希望在新窗口中打开的URL。 例如: 
window.location.href例子:
 window.location.href = 'http://www.google.com'; //Will take you to Google. 
window.open()例子:
 window.open('http://www.google.com'); //This will open Google in a new window. 
附加信息:
  window.open()可以传递额外的参数。 请参阅: window.open教程 
- 
window.open会用指定的URL打开一个新的浏览器。
- 
window.location.href将在调用代码的窗口中打开URL。
 另外请注意, window.open()是窗口对象本身的一个函数,而window.location是一个暴露了各种其他方法和属性的对象 。 
window.open是一种方法; 你可以打开新窗口,并可以自定义它。 window.location.href只是当前窗口的一个属性。
  window.open ()将打开一个新窗口,而window.location.href将在当前窗口中打开新的URL。 
已经有关于window.location.href属性和window.open()方法的描述。
我会去目标使用:
1.将页面redirect到另一个页面
使用window.location.href。 将href属性设置为另一个页面的href。
2.在新的或特定的窗口中打开链接。
使用window.open()。 按照您的目标传递参数。
3.了解该页面的当前地址
使用window.location.href。 获取window.location.href属性的值。 你也可以从window.location对象中获得特定的协议,主机名,哈希串。
请参阅位置对象获取更多信息。