3分钟
Window Location Href
location.href 属性返回当前页面的 URL。
返回(当前页面的)整个 URL:
<script>
document.write(location.href);
</script> 以上代码输出为:
document.write(location.href); location.href 属性返回当前页面的 URL。
返回(当前页面的)整个 URL:
<script>
document.write(location.href);
</script> 以上代码输出为:
document.write(location.href); Copyright © 2013-2025 Tencent Cloud.All Rights Reserved. 腾讯云 版权所有
学员评价