JS 获得文件所在目录

来源:互联网 发布:武汉网络营销策划 编辑:程序博客网 时间:2024/05/17 03:43
var URL=document.location.href.substring(0,document.location.href.indexOf(window.document.location.pathname)) + document.location.pathname.substring(0,document.location.pathname.lastIndexOf("/")+1);