0
之間的區別我發現,當位置屬性設置時,頁面將不會重定向util的JavaScript運行,但window.open將立即運行。 爲什麼? 是否有關於此的一些文件?下面 是測試碼..aboout window.location和window.open
<html>
<head>
<script type="text/javascript">
window.location.href = ("http://www.baidu.com");
window.open('http://google.com');
//alert(1);
</script>
</head>
<body>
<img src="http://pic5.bbzhi.com/fengjingbizhi/zhongguolvyoufengguanggaoqingbizhi/zhongguolvyoufengguanggaoqingbizhi_448610_9.jpg?q=1"
/>
</body>
</html>
但是一旦rode window.open運行,將會打開一個新窗口。 – SKing7 2012-08-08 11:50:01