js获取当前页面的地址
例1
// 地址:http://www.php230.com/fisker/post/0703/window.location.html?ver=1.0&id=6#imhere |
例2
window.location.href → 'https://www.jianshu.com/search?q=JS#comments' |
对于常用的地址如:http://192.168.10.235:8001/dev
可以用如下方法得到
function getCurrentUrl() { |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment