Javascript window.location和href之间的区别?

Javascript window.location和href之间的区别?,javascript,Javascript,这个词和行动有什么区别 <script> window.location.href = 'index.php'; window.location = 'index.php'; </script> window.location.href='index.php'; window.location='index.php'; 因为在某些情况下,点击按钮后会有一毫秒的时间来改变页面。这是什么 window.location.href返回当前页面的位置,而window.loc

这个词和行动有什么区别

<script>
window.location.href = 'index.php';
window.location = 'index.php';
</script>

window.location.href='index.php';
window.location='index.php';

因为在某些情况下,点击按钮后会有一毫秒的时间来改变页面。这是什么

window.location.href
返回当前页面的位置,而
window.location
返回一个位置对象,其中包含有关文档URL的信息,并提供更改该URL的方法。您还可以指定此属性以加载另一个URL


如果是派遣,没有区别。可能是重复的感谢兄弟这将有助于非常感谢你,我只想澄清我自己:)