Learn how to get the current URL with JavaScript.
Use window.location.href
to get the current URL address:
document.getElementById("demo").innerHTML =
"The full URL of this page is:<br>" + window.location.href;
Try it Yourself »
Read more about the window.location
object in our JavaScript Window Location Tutorial.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!