获取当前页面完整地址: var url = window.top.document.URL; 获取当前页面名称: var pagename=window.location.pathname 转载于:https://www.cnblogs.com/52xiaopeng/p/3522685.html