var url = window.location.href; var b = url.substring(url.lastIndexOf(‘/‘)+1, url.length);
获取当前页面的url
原文:http://www.cnblogs.com/chenzeyongjsj/p/5855242.html