获取当前页面的路径

var url=window.location.herf;

原文地址:https://www.cnblogs.com/wssdx/p/7928158.html