Get current URL in JavaScript?

来源:互联网 发布:阿里云 usb调试 编辑:程序博客网 时间:2024/06/05 20:15

http://stackoverflow.com/questions/406192/get-current-url-in-javascript

To get the path, you can use:

var pathname = window.location.pathname; // returns path onlyvar url      = window.location.href;     // returns full url 

0 0
原创粉丝点击